
Gawk-specific Features | 779
gawk
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
END {
1 print nusers, "users use Bash."
}
If sent SIGUSR1, pgawk prints the profile and an awk function call stack trace,
and then keeps going. Multiple SIGUSR1 signals may be sent; the profile and
trace will be printed each time. This facility is useful if your awk program appears
to be looping and you want to see if something unexpected is being executed.
If sent SIGHUP, pgawk prints the profile and stack trace, and then exits.
File Inclusion
The igawk program provides a file-inclusion facility for gawk. You invoke it the
same way you do gawk: it passes all command line arguments on to gawk.
However, igawk processes source files and command-line programs for special
statements of the form:
@include file.awk
Such files are searched for along the list of directories specified by the AWKPATH
environment variable. When found, the @include line is replaced with the text of
the corresponding file. Included files may themselves include other files with
@include.
The combination of the AWKPATH environment variable and igawk makes it
easy to have and use libraries of awk functions.
Internationalization
You can internationalize your programs if you use gawk. This consists of choosing
a text domain for your program, marking strings that are to be translated, and, ...