Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!brl-adm!adm!lesh@BRL.ARPA From: lesh@BRL.ARPA Newsgroups: comp.unix.questions Subject: AWK question Message-ID: <3746@brl-adm.ARPA> Date: Mon, 26-Jan-87 15:14:59 EST Article-I.D.: brl-adm.3746 Posted: Mon Jan 26 15:14:59 1987 Date-Received: Tue, 27-Jan-87 04:12:02 EST Sender: news@brl-adm.ARPA Lines: 22 I would like to use 'awk' to segregate data from a master file into specific files with the filename based on the contents of a specific field in one of the input records. 'awk' permits directing printed output to filenames specified in quoted variables. "Without quotes, the file names are treated as uninitialized variables and all output then goes to the same file."*1 Unquoted variables thus provide the vehicle to files named from a value obtained from a field of a previous record. THE PROBLEM: "Users should also note that there is an upper limit to the number of files that are written in this way. At present it is ten."*1 I can't find any way to close a file opened by 'awk' and very soon get the "too many opened files error message". Any suggestions? 1. Support Tools Guide, p. 6-31.