Next: Other Environment Variables, Previous: AWKPATH Variable, Up: Environment Variables [Contents][Index]
AWKLIBPATH
Environment VariableThe AWKLIBPATH
environment variable is similar to the AWKPATH
variable, but it is used to search for loadable extensions (stored as
system shared libraries) specified with the -l option rather
than for source files. If the extension is not found, the path is
searched again after adding the appropriate shared library suffix for
the platform. For example, on GNU/Linux systems, the suffix ‘.so’
is used. The search path specified is also used for extensions loaded
via the @load
keyword (see Loading Shared Libraries).
If AWKLIBPATH
does not exist in the environment, or if it has
an empty value, gawk
uses a default path; this
is typically ‘/usr/local/lib/gawk’, although it can vary depending
upon how gawk
was built.
gawk
places the value of the search path that it used into
ENVIRON["AWKLIBPATH"]
. This provides access to the actual search
path value from within an awk
program.