Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bitnip

    -v inFile[1]=file1.txt (use arrays with -v option)

    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]...
  2. bitnip

    Check number of lines in a file

    something like this? END { if( (NR==0) || (NR==1) ) system("cp inFile.txt copy_of_inFile.txt"); else { run_a_function(); copy_results(); } }
  3. bitnip

    -v inFile[1]=file1.txt (use arrays with -v option)

    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...

Part and Inventory Search

Back
Top