What is Awk?

Awk (also written as awk and AWK) is a programming language used for text processing and typically used as a data extraction tool. Awk comes with most UNIX-based operating systems, and also with some other operating systems, such as Windows 95/98/NT. AWK was created at Bell Labs in the 1970s, and its name is derived from the surnames of its authors Alfred Aho, Peter Weinberger, and Brian Kernighan.

An awk program is a sequence of pattern-action pairs, it reads the input a line at a time and the line is scanned for each pattern in the program and if positive, it performs the associated action. Awk can be used interactively or from script files.

Hello World in Awk

BEGIN { print "Hello, world!" }

The Code is self explanatory , the BEGIN keyword denotes the beginning of a awk program.

More Information:


Contributing to the Guide

This open source guide is curated by thousands of contributors. You can help by researching, writing and updating these articles. It is an easy and fun way to get started with contributing to open source.