Naming output file 
Author Message
 Naming output file

I was wondering if it is possible to take information from a variable
within an awk script and use that information to name the output file.
For example using the following script...

awk 'BEGIN {FS = "\t"}
     { if ($1 == "N"){
         batchnum = $2
  sequence = $3
  print $0}}
     END {print "L", batchnum, sequence}' test1 > "b



Sat, 07 Apr 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Naming output file

2. Naming output files in a loop

3. Outputting info from awk and using the info to name the awk output file

4. DOS File Lookup - just the file name, not the path AND file name

5. Extracting file name from lpq output

6. Naming the output file based on awk script variable

7. write to standard output as named file

8. Changing the name of an output file

9. a question about output file name

10. SWIG: output file name for *.py

11. how print output to screen and output file

12. How can I know the .EXE file name, file date, file size

 

 
Powered by phpBB® Forum Software