Previous slide Next slide Back to the first slide View text version


Notes:

The awk programming language, designed by Aho, Weinberger, and Kernighan was created to have a text manipulation tool: which could handle iterative routines and decision-making; along with supporting the full regular expression set. This is why awk closely resembled the C Programming Language.

It like any of the text processing commands (excluding editors), is a filter command. As a result, it can process files by passing filename(s) as arguments; or receive input from a pipeline.

Because of its programming features, its very useful for converting large volumes of data; along with creating very useful formatted reports.

*IMPORTANT*: The 'pattern { action }' portion is known as the program section. With exception to the BEGIN and END clauses, you can either specify a pattern or a match (not required to specify both).

A missing pattern will result in processing all records read (all records are processed under a true condition). The exception to this involves logical conditions embedded in the action which precludes further processing of the record.

If a pattern is specified without an action, then the entire record that satisfies the pattern (or criteria) is printed.

Needless to say patterns combine with pattern matches can lead to useful text filtering processes. Its important to mention that more than one pattern action statement can be used to process each of the input text records processed.