Commit | Line | Data |
---|---|---|
d631bd60 KB |
1 | #!/bin/sh - |
2 | # | |
934bce76 | 3 | # Copyright (c) 1988 The Regents of the University of California. |
d631bd60 KB |
4 | # All rights reserved. |
5 | # | |
934bce76 | 6 | # %sccs.include.redist.sh% |
d631bd60 | 7 | # |
934bce76 | 8 | # @(#)makewhatis.sed 5.5 (Berkeley) %G% |
d631bd60 | 9 | # |
934bce76 | 10 | |
d631bd60 KB |
11 | /(\([a-zA-Z0-9]*\).*UNIX Programmer's Manual/ { |
12 | s;.*(\([a-zA-Z0-9]*\).*UNIX.*;\1; | |
13 | h | |
14 | d | |
15 | } | |
7bfcbffd KB |
16 | |
17 | /^N\bNA\bAM\bME\bE/!d | |
d631bd60 KB |
18 | |
19 | :name | |
20 | s;.*;; | |
21 | N | |
22 | s;\n;; | |
4c5bf4fe KB |
23 | # some twits underline the command name |
24 | s;_\b;;g | |
d631bd60 KB |
25 | /^[^ ]/b print |
26 | H | |
27 | b name | |
28 | ||
29 | ||
30 | x | |
31 | s;\n;;g | |
32 | /-/!d | |
33 | s;\([a-z][A-z]\)-[ ][ ]*;\1; | |
34 | s;\([a-zA-Z0-9,]\)[ ][ ]*;\1 ;g | |
35 | s;[^a-zA-Z0-9]*\([a-zA-Z0-9]*\)[^a-zA-Z0-9]*\(.*\) - \(.*\);\2 (\1) - \3; | |
36 | p | |
7bfcbffd | 37 | q |