File: add-info-toc

package info (click to toggle)
texlive-bin 2007.dfsg.2-4%2Blenny3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 245,472 kB
  • ctags: 135,653
  • sloc: ansic: 971,350; cpp: 307,149; sh: 53,218; perl: 39,201; makefile: 12,611; python: 6,078; xml: 5,342; asm: 4,245; yacc: 3,108; pascal: 2,483; ruby: 2,089; ada: 1,681; lex: 1,654; objc: 1,357; awk: 1,214; tcl: 973; cs: 879; lisp: 708; sed: 536; java: 172; csh: 47
file content (21 lines) | stat: -rwxr-xr-x 363 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Public domain.  Originally written 1994, 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