O'Reilly logo

Unix in a Nutshell, 4th Edition by Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

awk

Synopsis

    awk [options] [program] [var=value ...] [files]

Use the pattern-matching program to process the specified files. program instructions have the general form:

pattern { procedure }

pattern and procedure are optional. When specified on the command line, program must be enclosed in single quotes to prevent the shell from interpreting its special symbols.

Two versions of awk exist: the original, "old" awk from V7 Unix, circa 1979, and "new" awk, from System V Release 4. POSIX awk is based on the new one.

On most systems, awk is a POSIX-compliant version, except on Solaris, where you must use /usr/xpg4/bin/awk instead of /usr/bin/awk. Some systems provide oawk and nawk commands as well. See Chapter 11 for more information (including examples) on awk.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required