File: mktxt

package info (click to toggle)
barcode 0.94-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 612 kB
  • ctags: 370
  • sloc: ansic: 2,205; perl: 1,676; python: 416; sh: 187; makefile: 170; awk: 74; sed: 5
file content (38 lines) | stat: -rwxr-xr-x 602 bytes parent folder | download | duplicates (2)
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
#! /usr/bin/awk -f

# Warning: this may use gnu-awk features

# Program to create ascii from info;
# Missing: table of contents

# skip 

BEGIN {NODELINE=0; NODE=0; KEEP=1; printf "\n\n"}


/^\037$/     { NODELINE=1; NODE=NODE+1; KEEP=1; next}

NODE==1      { next }

NODELINE==1  {
             NODELINE=2;
	     sub("^.*Node: ","*Node: ");
	     sub(",.*$","");
	     printf "\n\n\n%s",$0;
#print
	     next;
	     }

NODELINE     { NODELINE=NODELINE+1 }

NODELINE==4  { printf "\t\t\t\t"; }
NODELINE==5  { printf "\t\t\t\t"; NODELINE=0}


/^* Menu:$/  { KEEP=0 }



KEEP==0      { next }

{ print }