9

AWK

Chapter Objectives
  • The awk’s syntax with its selection criteria and action components
  • Structure of an awk script
  • The awk’s operational mechanism
  • Types of awk variables, fields and records
  • Addressing—context and line addressing
  • Patterns and operators
  • Decision and loop-control structures
  • Functions in awk—predefined and user-defined functions
  • Developing and executing an awk script
  • Working with associative arrays

awk is a filter program that was originally developed in 1977 by Aho, Weinberger and Kernighan as a pattern-scanning language. The name awk is derived from the first letters of its developer’s surnames. It is a programming language with C-like control structures, functions and variables. It was designed to work with structured ...

Get Introduction to Unix and Shell Programming 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.