awk questions: >10 output files; RS

Bruce Hamilton hamilton at aztec.osbusouth.xerox.COM
Sat Apr 15 13:34:23 AEST 1989


Since there's no comp.lang.awk, this must be the place...

I just bought Aho, Kernighan, & Weinberger and started
playing.  I may never use another language!  :-)

I did run into a couple of glitches:

-how can I get more than ten output files?  Even when I
explicitly "close"d each file after writing each record, awk
still barfed after writing 10 files.  I know I could up-level
and write an awk to generate awks to handle groups of
ten records, but then that is only good for 100 records...

-is there any way to set RS to a string, instead of just
one character?  It would allow me to write cleaner code
with fewer calls to substring to chop off beginnings and
endings of records.

Kindly cc: me by e-mail.

Thanks,

--Bruce
CSNet: Hamilton.osbuSouth at Xerox.COM
UUCP: xerox.com!hamilton.osbuSouth



More information about the Comp.unix.questions mailing list