home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff319.lzh
/
CNewsSrc
/
cnews.orig.lzh
/
relay
/
aux
/
canonsys.awk
next >
Wrap
Text File
|
1989-06-27
|
638b
|
22 lines
# canonicalise the sys file:
# delete comments & leading whitespace, collapse continued lines
# rewritten to avoid assignment to $0, which is broken in older awks
/^/ { thisln = $0 }
/^#/ { partline = ""; next } # delete comments
/^[\t ]/ {
for (s = substr(thisln, n); s ~ /^[\t ]/; s = substr(thisln, ++n))
; # skip leading whitespace
thisln = s
}
/\\$/ { partline = partline substr(thisln, 1, length(thisln)-1); next }
{ # non-continued line
partline = partline thisln # terminate the whole entry
if (partline != "")
print partline
partline = ""
}
END {
if (partline != "")
print partline # flush any partial line
}