Some gawk extensions and libraries

Here are some source libraries and extensions for gawk (the GNU awk implementation) of which I'm the author or else involved someway.


Initially named XMLgawk (2004) and later xgawk (2006). Currently renamed as gawkextlib (2012).

Gawkextlib is a shared library gawk extension that enables gawk to process XML data, interact with a PostgreSQL database, use the GD graphics library, and perform unlimited precision MPFR calculations.

The project is hosted at SourceForge:

Here you can find new experimental versions of some XML libraries.


Webargs is a small utility that enables some restricted form of URLs as file input arguments for gawk. Example:

gawk -f webargs.awk -f myscript.awk some_local_file.txt http://some.remote/file.html


Encodargs is a proof-of-concept module that automatically converts encoding of gawk input files on request. It allows mixing textual data with disparate encodings in the same gawk invocation. To request encoding conversion, just append the suffix ::encoding to the file name argument. Example:

gawk -f encodargs.awk -f myscript.awk normal_file.txt foreign_file.txt::iso-8859-15

Encodargs requires the iconv(1) utility to be installed.

Manuel Collado