gawk: gawkextlib
1
1 16.8 The 'gawkextlib' Project
1 =============================
1
1 The 'gawkextlib' (https://sourceforge.net/projects/gawkextlib/) project
1 provides a number of 'gawk' extensions, including one for processing XML
1 files. This is the evolution of the original 'xgawk' (XML 'gawk')
1 project.
1
1 There are a number of extensions. Some of the more interesting ones
1 are:
1
1 * 'abort' extension. It allows you to exit immediately from your
1 'awk' program without running the 'END' rules.
1
1 * 'json' extension. This serializes a multidimensional array into a
1 JSON string, and can deserialize a JSON string into a 'gawk' array.
1 This extension is interesting since it is written in C++ instead of
1 C.
1
1 * MPFR library extension. This provides access to a number of MPFR
1 functions that 'gawk''s native MPFR support does not.
1
1 * Select extension. It provides functionality based on the
1 'select()' system call.
1
1 * XML parser extension, using the Expat
1 (https://expat.sourceforge.net) XML parsing library
1
1 You can check out the code for the 'gawkextlib' project using the Git
1 (https://git-scm.com) distributed source code control system. The
1 command is as follows:
1
1 git clone git://git.code.sf.net/p/gawkextlib/code gawkextlib-code
1
1 You will need to have the RapidJson (http://www.rapidjson.org) JSON
1 parser library installed in order to build and use the 'json' extension.
1
1 You will need to have the Expat (https://expat.sourceforge.net) XML
1 parser library installed in order to build and use the XML extension.
1
1 In addition, you must have the GNU Autotools installed (Autoconf
1 (https://www.gnu.org/software/autoconf), Automake
1 (https://www.gnu.org/software/automake), Libtool
1 (https://www.gnu.org/software/libtool), and GNU 'gettext'
1 (https://www.gnu.org/software/gettext)).
1
1 The simple recipe for building and testing 'gawkextlib' is as
1 follows. First, build and install 'gawk':
1
1 cd .../path/to/gawk/code
1 ./configure --prefix=/tmp/newgawk Install in /tmp/newgawk for now
1 make && make check Build and check that all is OK
1 make install Install gawk
1
1 Next, go to <https://sourceforge.net/projects/gawkextlib/files> to
1 download 'gawkextlib' and any extensions that you would like to build.
1 The 'README' file at that site explains how to build the code. If you
1 installed 'gawk' in a non-standard location, you will need to specify
1 './configure --with-gawk=/PATH/TO/GAWK' to find it. You may need to use
1 the 'sudo' utility to install both 'gawk' and 'gawkextlib', depending
1 upon how your system works.
1
1 If you write an extension that you wish to share with other 'gawk'
1 users, consider doing so through the 'gawkextlib' project. See the
1 project's website for more information.
1