- The programs provided in this chapter
continue on the theme that reading programs is an excellent way to learn
- Using ‘#!’ to make
awk programs directly runnable makes
them easier to use. Otherwise, invoke the program using ‘awk
- Reimplementing standard POSIX programs in
awk is a pleasant
awk’s expressive power lets you write such programs
in relatively few lines of code, yet they are functionally complete
- One of standard
awk’s weaknesses is working with individual
characters. The ability to use
split() with the empty string as
the separator can considerably simplify such tasks.
- The examples here demonstrate the usefulness of the library
functions from Library Functions
for a number of real (if small) programs.
- Besides reinventing POSIX wheels, other programs solved a selection of
interesting problems, such as finding duplicate words in text, printing
mailing labels, and finding anagrams.