File: mkwhatis

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (41 lines) | stat: -rwxr-xr-x 1,141 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
# Copyright INRIA
for i in $*
do
        sed -n -e '/^.SH *NAME */,/^./p' $i |sed -n -e '2p'|awk '{printf "%s ",$1;i=1;while (i++<=NF) printf "%s ",tolower($i);printf "\n" }'
done  |\
sed	-e 's/\\(em/-/'		\
	-e 's/\\(hy/-/'		\
	-e 's/\\(mi/-/'		\
	-e 's/ \\- / @/'        \
	-e 's/\\- /@/'		\
	-e 's/  *- / @/'	\
	-e 's/- /@/'		\
	-e 's/ VAX-11//'	\
	-e 's/\.[iI]X *"[^"]*" *"[^"]*" *"[^"]*" *"[^"]*" *//g' \
	-e 's/\.[iI]X *"[^"]*" *"[^"]*" *"[^"]*" *//g'          \
	-e 's/\.[iI]X *"[^"]*" *"[^"]*" *//g'                   \
	-e 's/\.[iI]X *"[^"]*" *//g'                            \
	-e 's/\.cS .*\.cE//'    \
	-e 's/\.PP *//g'	\
	-e 's/\.B *//g'		\
	-e 's/\.rS *//g'	\
	-e 's/\.gL *".*"//g'	\
	-e 's/\.br *//g'	\
	-e 's/\.nL *//g'        \
	-e 's/\\&//g'		\
	-e 's/"" *//g'		\
	-e 's/\.UC [0-9]//g'	\
	-e 's/"\([0-9]*\)"/\1/g' \
	-e 's/"LOCAL"/LOCAL/g'	\
	-e 's/"//g'		\
	-e 's/	\\f[PRIB0123] */	/g' \
	-e 's/\\f[PRIB0123]//g'	\
	-e 's/\\s[-+0-9]*//g'	\
	-e 's/\\\*[LO]//g'	\
	-e 's/\\\//\//g'	\
	-e 's/.TH *[^ ][^ ]* \([^ 	]*\).*	\([^@]*\)@/\2(\1)	- /' \
	-e 's/@/- /'		\
	-e 's/	 /	/g'     \
	-e 's/^ *//' |\
sort -u >whatis