Go to the first, previous, next, last section, table of contents.


Using This Book

Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing.
Dick Brandon

The term @command{awk} refers to a particular program as well as to the language you use to tell this program what to do. When we need to be careful, we call the program "the @command{awk} utility" and the language "the @command{awk} language." This Info file explains both the @command{awk} language and how to run the @command{awk} utility. The term @command{awk program} refers to a program written by you in the @command{awk} programming language.

Primarily, this Info file explains the features of @command{awk}, as defined in the POSIX standard. It does so in the context of the @command{gawk} implementation. While doing so, it also attempts to describe important differences between @command{gawk} and other @command{awk} implementations.(3) and @command{awk}."} Finally, any @command{gawk} features that are not in the POSIX standard for @command{awk} are noted.

@ifnotinfo This Info file has the difficult task of being both a tutorial and a reference. If you are a novice, feel free to skip over details that seem too complex. You should also ignore the many cross references; they are for the expert user and for the online Info version of the document.

There are subsections labelled as Advanced Notes scattered throughout the Info file. They add a more complete explanation of points that are relevant, but not likely to be of interest on first reading. All appear in the index, under the heading "advanced notes."

Most of the time, the examples use complete @command{awk} programs. In some of the more advanced sections, only the part of the @command{awk} program that illustrates the concept currently being described is shown.

While this Info file is aimed principally at people who have not been exposed to @command{awk}, there is a lot of information here that even the @command{awk} expert should find useful. In particular, the description of POSIX @command{awk} and the example programs in @ref{Library Functions, ,A Library of @command{awk} Functions}, and in @ref{Sample Programs, ,Practical @command{awk} Programs}, should be of interest.

@ref{Getting Started, ,Getting Started with @command{awk}}, provides the essentials you need to know to begin using @command{awk}.

section Regular Expressions, introduces regular expressions in general, and in particular the flavors supported by POSIX @command{awk} and @command{gawk}.

section Reading Input Files, describes how @command{awk} reads your data. It introduces the concepts of records and fields, as well as the getline command. I/O redirection is first described here.

section Printing Output, describes how @command{awk} programs can produce output with print and printf.

section Expressions, describes expressions, which are the basic building blocks for getting most things done in a program.

section Patterns, Actions, and Variables, describes how to write patterns for matching records, actions for doing something when a record is matched, and the built-in variables @command{awk} and @command{gawk} use.

@ref{Arrays, ,Arrays in @command{awk}}, covers @command{awk}'s one-and-only data structure: associative arrays. Deleting array elements and whole arrays is also described, as well as sorting arrays in @command{gawk}.

section Functions, describes the built-in functions @command{awk} and @command{gawk} provide for you, as well as how to define your own functions.

@ref{Internationalization, ,Internationalization with @command{gawk}}, describes special features in @command{gawk} for translating program messages into different languages at runtime.

@ref{Advanced Features, ,Advanced Features of @command{gawk}}, describes a number of @command{gawk}-specific advanced features. Of particular note are the abilities to have two-way communications with another process, perform TCP/IP networking, and profile your @command{awk} programs.

@ref{Invoking Gawk, ,Running @command{awk} and @command{gawk}}, describes how to run @command{gawk}, the meaning of its command-line options, and how it finds @command{awk} program source files.

@ref{Library Functions, ,A Library of @command{awk} Functions}, and @ref{Sample Programs, ,Practical @command{awk} Programs}, provide many sample @command{awk} programs. Reading them allows you to see @command{awk} being used for solving real problems.

@ref{Language History, ,The Evolution of the @command{awk} Language}, describes how the @command{awk} language has evolved since it was first released to present. It also describes how @command{gawk} has acquired features over time.

@ref{Installation, ,Installing @command{gawk}}, describes how to get @command{gawk}, how to compile it under Unix, and how to compile and use it on different non-Unix systems. It also describes how to report bugs in @command{gawk} and where to get three other freely available implementations of @command{awk}.

section Implementation Notes, describes how to disable @command{gawk}'s extensions, as well as how to contribute new code to @command{gawk}, how to write extension libraries, and some possible future directions for @command{gawk} development.

section Basic Programming Concepts, provides some very cursory background material for those who are completely unfamiliar with computer programming. Also centralized there is a discussion of some of the issues involved in using floating-point numbers.

The section Glossary, defines most, if not all, the significant terms used throughout the book. If you find terms that you aren't familiar with, try looking them up.

section GNU General Public License, and section GNU Free Documentation License, present the licenses that cover the @command{gawk} source code, and this Info file, respectively.


Go to the first, previous, next, last section, table of contents.