AWK Process
AWK Process
- AWK Program is the serious of ‘pattern {action}’ statements.
- AWK Language Processor is the command itself(awk & nawk).
- Input/Output Streams are ASCII Text Records. The text can be treated as:
- strings
- numeric quantities
- individual characters
- fields
Output Stream
AWK Program
Input Stream
AWK Language Processor
(COMMAND)
Notes:
Awk works on a very simple concepts:
- BEGIN and END patterns must include an action statement.
- User Defined pattern {action} may have:
- a pattern without an action; where the entire record is printed for the pattern matched.
- no pattern with an action; where all records are processed as the pattern match defaults to a true condition.
Awk can be a very intimidating program to learn. However, once you understand the basic components of:
How to Start a Programas a commandreading program from a program source file
as the program can be part of a command line or part of a script file.
Understand the functionality of pattern action statements such as:
BEGIN and END statementsUser Defined Pattern Actions