Thanks! I'm pretty sure I tried this before but didn't know about "need to removed them from the ARGV array"... so it didn't work properly. But yeah, this seems to work:
BEGIN {
for(i=1; i<ARGC; i++)
{
inFile[i] = ARGV[i]; # assign filenames to array
delete ARGV[i]...
hey guys, i just joined. Looks like cool community, thanks in advance.
I have an AWK script, "awk.prog", that I launch with a text file that looks like this:
awk -f awk.prog -v inFile1=file1.txt -v inFile2=file2.txt -v inFile3=file3.txt .
.
.
...etc...
and then in the AWK script I have...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.