gawk: Running gawk

 
 1.1 How to Run 'awk' Programs
 =============================
 
 There are several ways to run an 'awk' program.  If the program is
 short, it is easiest to include it in the command that runs 'awk', like
 this:
 
      awk 'PROGRAM' INPUT-FILE1 INPUT-FILE2 ...
 
    When the program is long, it is usually more convenient to put it in
 a file and run it with a command like this:
 
      awk -f PROGRAM-FILE INPUT-FILE1 INPUT-FILE2 ...
 
    This minor node discusses both mechanisms, along with several
 variations of each.
 

Menu