Before you start
Learn what to expect from this tutorial, how to get the most out of it, and what you need to work through it.
GNU AWK (GAWK) is an open source implementation of the venerable AWK programming language and it is available for all UNIX® systems. The AWK language is a UNIX standby -- a powerful text-manipulation and pattern-matching language that is particularly suited for information retrieval, making it ideal for use with today's database-driven applications. Because of its integration with the UNIX environment, complete working programs can be conceived, built, and executed quickly, with immediate results.
This tutorial provides a hands-on introduction to the AWK text-processing language. It shows how to use the open source GAWK interpreter to write and execute AWK programs so that you can search and manipulate your data in various ways.
This tutorial is written for anyone who wants to begin harnessing the text-manipulation power of AWK. In this tutorial, you use GAWK to learn the various methods of running AWK programs. You also see how programs are structured and learn AWK's record and field paradigm. By the time you have completed the tutorial, you will have learned the rudimentary aspects of the language, including formatting output, record and field manipulation, and pattern matching. You should also be able to write custom AWK programs to perform complex text processing from the UNIX command line.
This tutorial has no particular prerequisites, although you should be familiar
with using a UNIX command-line shell. Some familiarity with the constructs of
the C programming language is helpful, but it is not
required.
You must have a working copy of GAWK installed on your system, preferably Version 3.0 or later. GAWK is easily obtainable in both source and binary packages (see Resources). If you're installing GAWK from source, consult the README file in the GAWK source distribution, which lists any additional software requirements for successful compilation and installation.




