webargs for gawk ---------------- Manuel Collado, http://mcollado.z15.es November, 2006 - Public domain Overview -------- This is a demo code that shows how to use URLs as input file arguments. The gawkinet facilities are used to retrive files from internet. It is inspired by the fact that modern XML processors implement this feature. Examples (very long command lines): xsltproc http://lml.ls.fi.upm.es/~mcollado/xml/ejemplos/cdcatalog/cdcatalog_1.xsl http://lml.ls.fi.upm.es/~mcollado/xml/ejemplos/cdcatalog/cdcatalog.xml saxon -u http://lml.ls.fi.upm.es/~mcollado/xml/ejemplos/cdcatalog/cdcatalog.xml http://lml.ls.fi.upm.es/~mcollado/xml/ejemplos/cdcatalog/cdcatalog_1.xsl Operation --------- Webargs replaces each URL in the command line with a downloaded local copy. When the local copy is to be processed, the original URL is restored in the FILENAME predefined variable. A summary of each downloading action is printed on /dev/stderr Usage ----- Just put '-f webargs.awk' as the first program parameter in the command line. Instead of writing: gawk -f myprogram.awk local-filenames... You can say: gawk -f webargs.awk -f myprogram.awk URLs-or-filenames... Examples -------- gawk -f webargs.awk -f list.awk local.txt http://mcollado.z15.es gawk -f webargs.awk -f showlinks.awk http://mcollado.z15.es/ Limitations ----------- - Only the HTTP protocol is supported. - Ports numbers are not properly handled.