Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ihnp4!ihdev!pdg From: pdg@ihdev.UUCP Newsgroups: comp.unix.questions Subject: Re: some questions about awk Message-ID: <1168@ihdev.UUCP> Date: Wed, 18-Feb-87 11:35:16 EST Article-I.D.: ihdev.1168 Posted: Wed Feb 18 11:35:16 1987 Date-Received: Thu, 19-Feb-87 20:44:23 EST References: <254@herman.UUCP> <1446@umd5> Reply-To: pdg@ihdev.UUCP (55224-P. D. Guthrie) Organization: American Nasal Amputation Centre Lines: 21 Keywords: awk In article <1446@umd5> zben@umd5.umd.edu (Ben Cranston) writes: >awk 'BEGIN { fnam = FILENAME } >(fnam!=FILENAME) { NR=1 ; fnam=FILENAME ; printf "%c\n",12 } >{ print } >(65==((NR-1)%66)) { printf "%c\n",12 }' $* >There is a bug if you feed it the same file(name) twice. Any REAL awk >freaks out there know a solution to this? In the REAL awk on my machine , just test FNR == 1 (Line number in the current file). But as has been mentioned before, this will not become available until the next release of SVR3. Or of course you could parse through the file list yourself by using ARGV[]. This probably didn't help anyone at all, but its nice to know what to look forward to in the future. -- Paul Guthrie ihnp4!ihdev!pdg This Brain left intentionally blank.