Copyright (C) 2000-2012 |
GNU Info (gawk.info)This ManualUsing 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 `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 `awk' utility" and the language "the `awk' language." This Info file explains both the `awk' language and how to run the `awk' utility. The term "`awk' program" refers to a program written by you in the `awk' programming language. Primarily, this Info file explains the features of `awk', as defined in the POSIX standard. It does so in the context of the `gawk' implementation. While doing so, it also attempts to describe important differences between `gawk' and other `awk' implementations.(1) Finally, any `gawk' features that are not in the POSIX standard for `awk' are noted. 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 `awk' programs. In some of the more advanced sections, only the part of the `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 `awk', there is a lot of information here that even the `awk' expert should find useful. In particular, the description of POSIX `awk' and the example programs in *Note A Library of `awk' Functions: Library Functions, and in Note: Practical `awk' Programs, should be of interest. Note: Getting Started with `awk', provides the essentials you need to know to begin using `awk'. Note: Regular Expressions, introduces regular expressions in general, and in particular the flavors supported by POSIX `awk' and `gawk'. Note: Reading Input Files, describes how `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. Note: Printing Output, describes how `awk' programs can produce output with `print' and `printf'. Note: Expressions, describes expressions, which are the basic building blocks for getting most things done in a program. Note: 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 `awk' and `gawk' use. Note: Arrays in `awk', covers `awk''s one-and-only data structure: associative arrays. Deleting array elements and whole arrays is also described, as well as sorting arrays in `gawk'. Note: Functions, describes the built-in functions `awk' and `gawk' provide for you, as well as how to define your own functions. Note: Internationalization with `gawk', describes special features in `gawk' for translating program messages into different languages at runtime. Note: Advanced Features of `gawk', describes a number of `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 `awk' programs. Note: Running `awk' and `gawk', describes how to run `gawk', the meaning of its command-line options, and how it finds `awk' program source files. Note: A Library of `awk' Functions, and Note: Practical `awk' Programs, provide many sample `awk' programs. Reading them allows you to see `awk' being used for solving real problems. Note: The Evolution of the `awk' Language, describes how the `awk' language has evolved since it was first released to present. It also describes how `gawk' has acquired features over time. Note: Installing `gawk', describes how to get `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 `gawk' and where to get three other freely available implementations of `awk'. Note: Implementation Notes, describes how to disable `gawk''s extensions, as well as how to contribute new code to `gawk', how to write extension libraries, and some possible future directions for `gawk' development. Note: 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 Note: 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. Note: GNU General Public License, and Note: GNU Free Documentation License, present the licenses that cover the `gawk' source code, and this Info file, respectively. ---------- Footnotes ---------- (1) All such differences appear in the index under the heading "differences between `gawk' and `awk'." automatically generated by info2www version 1.2.2.9 |