awk - report generator.

Authors : Alfred Aho, Peter Weinberger, and Brian Kernighan.

  • Uses text matching features of regular expressions.
  • Uses program logic flow of C language.
  • Uses the output formatting capabilities of printf.
  • Most effective when used on column based data files.
  • Designed to generate a formatted report.
  • Reads one line of data from the data file at a time and attempts to apply each provided awk statement as appropriate.
  • Sends modified output to standard out, so use redirection or piping to capture output.
  • Has ability to execute commands before first line read. This allows for header output and initialization.
  • Has ability to execute commands after last line processed. This allows for further analysis of all data read and generating summary reports.
    Several versions have evolved over the years, awk, nawk, gawk, mawk.
    On our system, awk and nawk link back to /usr/bin/mawk


    awk [options] -f 'cmd_file' data-file[s] > output [options]