GNU Info

Info Node: (gawk.info)Command Line

(gawk.info)Command Line


Next: Options Prev: Invoking Gawk Up: Invoking Gawk
Enter node , (file) or (file)node

Invoking `awk'
==============

   There are two ways to run `awk'--with an explicit program or with
one or more program files.  Here are templates for both of them; items
enclosed in [...] in these templates are optional:

     awk [OPTIONS] -f progfile [`--'] FILE ...
     awk [OPTIONS] [`--'] 'PROGRAM' FILE ...

   Besides traditional one-letter POSIX-style options, `gawk' also
supports GNU long options.

   It is possible to invoke `awk' with an empty program:

     awk '' datafile1 datafile2

Doing so makes little sense though; `awk' exits silently when given an
empty program.  (d.c.)  If `--lint' has been specified on the
command-line, `gawk' issues a warning that the program is empty.


automatically generated by info2www version 1.2.2.9