What Is awk?

awk is a program and a programming language that enable you to search through files and modify records in these files based on patterns. The name awk comes from the last names of its creators Alfred Aho, Peter Weinberger, and Brian Kernighan. awk was added to UNIX Version 7 in 1978 and has been an indispensable part of it ever since.

There are three versions of awk:

  • Original awk

  • New nawk

  • The POSIX/GNU version gawk

Original awk has remained almost the same since its first introduction to UNIX in 1978. It was intended to be a small programming language for filtering text and producing reports. By the mid-1980s, people were using awk for large programs, so its authors decided to extend it. This version, called nawk (short for new awk), ...

Get Sams Teach Yourself Shell Programming in 24 Hours, Second Edition 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.