DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

Programming with awk

Basic awk
    Program structure
    Usage
    Fields
    Printing
    Formatted printing
    Simple patterns
    Simple actions
        Built-in variables
        User-defined variables
        Functions
    A handful of useful one-liners
    Error messages

Patterns
    BEGIN and END
    Relational expressions
    Extended regular expressions
    Combinations of patterns
    Pattern ranges

Actions
    Built-in variables
    Arithmetic
    Strings and string functions
    Field variables
    Number or string?
    Control flow statements
    Arrays
    User-defined functions
    Some lexical conventions

Output
    The print statement
    Output separators
    The printf statement
    Output to files
    Output to pipes

Input
    Files and pipes
    Input separators
    Multi-line records
    The getline function
    Command-line arguments

Using awk with other commands and the shell
    The system function
    Cooperation with the shell

Example applications
    Generating reports
    Word frequencies
    Accumulation
    Random choice
    History facility
    Form-letter generation

awk summary
    Command line
    Patterns
    Control flow statements
    Input-output
    Functions
    String functions
    Arithmetic functions
    Operators (increasing precedence)
    Regular expressions (increasing precedence)
    Built-in variables
    Limits
    Initialization, comparison, and type coercion