diff options
| author | wkj <devnull@localhost> | 2004-05-17 03:22:35 +0000 |
|---|---|---|
| committer | wkj <devnull@localhost> | 2004-05-17 03:22:35 +0000 |
| commit | aa83d77271f0d2be72067058f78abd1780f3b69e (patch) | |
| tree | 14a24e73abb43ad0b7340a1623e077a733b0be33 /src/cmd/index/range.prep | |
| parent | a7eb134e8717c2ea831066891314cf74fa4a6ad3 (diff) | |
| download | plan9port-aa83d77271f0d2be72067058f78abd1780f3b69e.tar.gz plan9port-aa83d77271f0d2be72067058f78abd1780f3b69e.zip | |
More troff bits; if you want them elsewhere, feel free to repo copy them.
Diffstat (limited to 'src/cmd/index/range.prep')
| -rw-r--r-- | src/cmd/index/range.prep | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmd/index/range.prep b/src/cmd/index/range.prep new file mode 100644 index 00000000..16ae3cc8 --- /dev/null +++ b/src/cmd/index/range.prep @@ -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 } +' $* |
