Using Awk

GNU awk—or gawk—is a version of the text processing and patterning language originally developed by Alfred V. Aho, Peter J. Weinberger, and Brian W. Kernighan (the name awk comes from the first letters of their last names).

Awk is best used for processing text files because it "thinks" in fields and records, typically words and lines. Therefore, it's not very good at handling binary files. A typical awk application is one that translates data into a formatted approach.

You'll find a great deal of information about programming with gawk in your /usr/doc/gawk-3.0.3 directory.

Gawk can be used from the command interactively, in which case the gawk commands need to be enclosed in single quotation marks to tell the shell not to process them. ...

Get Red Hat Linux 6: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.