9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] open file in awk script?
@ 2013-04-08 16:07 dexen deVries
  2013-04-08 16:50 ` Anthony Martin
  0 siblings, 1 reply; 2+ messages in thread
From: dexen deVries @ 2013-04-08 16:07 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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;


-- 
dexen deVries

[[[↓][→]]]




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] open file in awk script?
  2013-04-08 16:07 [9fans] open file in awk script? dexen deVries
@ 2013-04-08 16:50 ` Anthony Martin
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony Martin @ 2013-04-08 16:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

dexen deVries <dexen.devries@gmail.com> 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-08 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-08 16:07 [9fans] open file in awk script? dexen deVries
2013-04-08 16:50 ` Anthony Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).