Discussion:
[9fans] open file in awk script?
(too old to reply)
dexen deVries
2013-04-08 16:07:57 UTC
Permalink
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

[[[↓][→]]]
Anthony Martin
2013-04-08 16:50:34 UTC
Permalink
Post by dexen deVries
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

Loading...