Path: utzoo!attcan!uunet!mcvax!ukc!reading!riddle!domo From: domo@riddle.UUCP (Dominic Dunlop) Newsgroups: comp.unix.questions Subject: Re: awk questions: >10 output files; RS Keywords: awk Message-ID: <1012@riddle.UUCP> Date: 25 Apr 89 19:12:36 GMT References: <255@aztec.osbusouth.xerox.COM> Reply-To: domo@riddle.UUCP (Dominic Dunlop) Organization: Sphinx Ltd., Maidenhead, England Lines: 38 In article <255@aztec.osbusouth.xerox.COM> hamilton.osbuSouth@Xerox.COM (Bruce Hamilton) writes: > >-how can I get more than ten output files? [in awk] Thought this was fixed in nawk. Or am I wrong? Anyway, the way to get around this `feature' of awk is to have awk create a shell script with here documents, than feed it to a shell. If you feel ambitious you can have awk pipe the data itself by putting | "sh" on the end of all the printing commands, otherwise, just do it in the shell: awk -f script input | sh What awk should be spitting out is something like cat << E_O_F >file001 lines of data for file001 E_O_F cat << E_O_F >file002 lines of data for file002 E_O_F ... cat << E_O_F >filennn lines of data for filennn E_O_F (Think that's the third time I've posted this in the last few years. I must be getting old...) -- Dominic Dunlop The Standard Answer Ltd., using Sphinx' facilities (for which much thanks) domo@sphinx.co.uk