File: add-info-toc

package info (click to toggle)
tetex-bin 2.0.2-30sarge5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 50,108 kB
  • ctags: 38,418
  • sloc: ansic: 295,045; cpp: 54,320; sh: 25,684; perl: 8,806; makefile: 3,892; yacc: 2,235; pascal: 1,381; awk: 1,103; asm: 851; lex: 833; lisp: 527; sed: 518; csh: 47
file content (21 lines) | stat: -rwxr-xr-x 337 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Copyright 1997 Karl Berry.
	
temp=${TMPDIR-/tmp}/ait.$$

echo Contents: >$temp
echo >>$temp

awk '
	{ prevline = line; line = $0 }
/^\*+$/	{ print prevline }
/^=+$/	{ print "  " prevline }
/^-+$/	{ print "    " prevline }
/^\.+$/	{ print "      " prevline }
' $*>>$temp

echo >>$temp
echo >>$temp
cat $* >>$temp

mv $temp $1