DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(gawk) Running gawk

Info Catalog (gawk) Names (gawk) Getting Started (gawk) Very Simple
 
 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 ...
 
 where PROGRAM consists of a series of patterns and actions, as
 described earlier.  (The reason for the single quotes is described
 below, in  One-shot Throw-away `awk' Programs One-shot.)
 
    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 ...
 

Menu

 
* One-shot                    Running a short throw-away `awk' program.
* Read Terminal               Using no input files (input from terminal
                                 instead).
* Long                        Putting permanent `awk' programs in
                                 files.
* Executable Scripts          Making self-contained `awk' programs.
* Comments                    Adding documentation to `gawk' programs.
 
Info Catalog (gawk) Names (gawk) Getting Started (gawk) Very Simple
automatically generated byinfo2html