From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 8 Apr 2013 09:50:34 -0700 From: Anthony Martin To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20130408165034.GA16183@dinah> References: <7348512.x7WV1SlMj3@coil> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7348512.x7WV1SlMj3@coil> Subject: Re: [9fans] open file in awk script? Topicbox-Message-UUID: 3f4d2658-ead8-11e9-9d60-3106f5b1d025 dexen deVries once said: > trying to create a standalone awk script (#!/usr/local/plan9/bin/awk -f). > > how to open a file in BEGIN pattern section and set it as next input file? > > not helped so far: FILENAME="foo.txt" > nor ARGV[1]="foo.txt"; nextfile; ARGV[ARGC++] = "foo.txt" Anthony