More troff bits; if you want them elsewhere, feel free to repo copy them.
This commit is contained in:
parent
a7eb134e87
commit
aa83d77271
22 changed files with 670 additions and 1 deletions
10
src/cmd/index/range.prep
Normal file
10
src/cmd/index/range.prep
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
awk ' # range.prep
|
||||
# Input: ["%begin"|"%end"|""] string (tab) number
|
||||
# Output: string (tab) ["b"|"e"|"a"] (tab) number
|
||||
|
||||
BEGIN { FS = OFS = "\t" }
|
||||
{ f2 = "a" }
|
||||
$1 ~ /^%begin/ { f2 = "b"; sub(/^%begin */, "", $1) }
|
||||
$1 ~ /^%end/ { f2 = "e"; sub(/^%end */, "", $1) }
|
||||
{ print $1, f2, $2 }
|
||||
' $*
|
||||
Loading…
Add table
Add a link
Reference in a new issue