Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!newstop!sun!dmaustin From: dmaustin@vivid.sun.com (Darren Austin) Newsgroups: comp.unix.questions Subject: Stupid awk question Message-ID: Date: 10 Oct 89 21:59:18 GMT Sender: news@sun.Eng.Sun.COM Distribution: comp Organization: Sun Microsystems, Mountain View Lines: 27 Hi all, I am trying to split up a large output file into several smaller files. The smaller files are named after the value in the second field. I tried using the following simple awk script, (current == $2) {print > current".summary"} (current != $2) {close(current".summary");current=$2;print > current".summary";} but it fails with awk: too many output files 10 so apparently it is running out of file descriptors. I thought that would be taken care of by using the "close" function. Am I using it incorrectly, or am I doing something else wrong? Is there a better way to do this with other tools? Any help would be appreciated, --Darren P.S. This is on a Sun 3/60 SUNOS 4.0.3. -- --------------------------------------+------------------------------- Darren Austin | Is is a mistake to think you Sun Microsystems, Mountain View | can solve any major problem dmaustin@sun.com | just with potatoes. --------------------------------------+-------------------------------