1#!/bin/sh - 2# 3# Copyright (c) 1988 Regents of the University of California. 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms are permitted 7# provided that this notice is preserved and that due credit is given 8# to the University of California at Berkeley. The name of the University 9# may not be used to endorse or promote products derived from this 10# software without specific prior written permission. This software 11# is provided ``as is'' without express or implied warranty. 12# 13# @(#)makewhatis.sed 5.2 (Berkeley) 03/27/88 14# 15/(\([a-zA-Z0-9]*\).*UNIX Programmer's Manual/ { 16 s;.*(\([a-zA-Z0-9]*\).*UNIX.*;\1; 17 h 18 d 19} 20/^NAME/!d 21 22:name 23 s;.*;; 24 N 25 s;\n;; 26 # some twits underline the command name 27 s;_;;g 28 /^[^ ]/b print 29 H 30 b name 31 32:print 33 x 34 s;\n;;g 35 /-/!d 36 s;\([a-z][A-z]\)-[ ][ ]*;\1; 37 s;\([a-zA-Z0-9,]\)[ ][ ]*;\1 ;g 38 s;[^a-zA-Z0-9]*\([a-zA-Z0-9]*\)[^a-zA-Z0-9]*\(.*\) - \(.*\);\2 (\1) - \3; 39 p 40 d 41