home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 33.11 Quick Reference: awk Chapter 33
Batch Editing
Next: 34. The sed Stream Editor
 

33.12 Versions of awk

awk was introduced as part of UNIX's seventh edition and has been part of the standard distribution ever since.

In 1985, the authors of awk extended the language, adding many useful features. Unfortunately, this new version remained inside AT&T for several years. It became a regular part of AT&T's System V as of Release 3.1. It can be found under the name of nawk (for new awk ); the older version still exists under its original name.

gawk
Unfortunately, nawk is not available on all systems. The good news is that the Free Software Foundation ( 52.9 ) GNU project's version of awk , called gawk , implements all the features of the new awk .

In general, you can assume that what is true for nawk is true for gawk , unless gawk is explicitly called out. Scripts written for nawk are 100 percent compatible with gawk . If you want to use one of the nawk scripts, and don't have nawk on your system, simply change the script to invoke gawk instead.

There are a few areas where gawk has introduced gawk -specific features; however, recent versions of nawk support many of these features, suggesting that the remaining differences are really very minor. This shouldn't matter in any case, since we do supply gawk on the disc.

This book doesn't cover any of the awk s in detail. The recent awk s, especially, have quite a few features in common - so documentation for any one of them should help you learn the others.

In this book, we show scripts for awk as well as scripts that only work on nawk and gawk . But we barely scratch the surface of all the awk s' features. The completely revised second edition of O'Reilly & Associates' sed & awk has detailed information on all of them. [2] There's also lots of documentation on the CD-ROM. Take your pick.

[2] And thanks to Arnold Robbins, co-author of the second edition, for his help with this section and other awk material in this book.

- JP , DD, TOR


Previous: 33.11 Quick Reference: awk UNIX Power Tools Next: 34. The sed Stream Editor
33.11 Quick Reference: awk Book Index 34. The sed Stream Editor

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System