Want an AWK that implements '@include'

In the gawk manual, I describe the @include statement . This allows you to create .awk modules and share scripts, etc. Include files.

So far, the latest cgywin, mingw and gnu awk-s (awk, gawk, mawk, nawk, ...) I found Windows to crash the first time: @include .

Can someone point me to a version that implements the entire implementation of nawk or awk for Windows? I am sure that on the same day there was at least one nawk that we downloaded to run Windows NT.

Alternatively, running time will be helpful. (Say the pre-tested awk include program)?

TIA Will

+5
source share
4 answers

, @include gawk 4.x. , , Linux script, igawk, ; awk- @include ( $AWKPATH). , Cygwin script?

$ cat foo.awk
@include bar.awk
$ cat bar.awk
BEGIN {print "Hello, world!" }
$ awk -f foo.awk
awk: foo.awk:1: @include bar.awk
awk: foo.awk:1: ^ invalid char '@' in expression
$ gawk -f foo.awk
gawk: foo.awk:1: @include bar.awk
gawk: foo.awk:1: ^ invalid char '@' in expression
$ igawk -f foo.awk
Hello, world!

, , igawk gawk 4 @include . @include gawk 4 ; igawk , .

+5

awk, .

awk myawklib.awk. awk. BEGIN END. BODY, , . .

:

awk -f myawklib.awk -f main.awk program_arguments

awk -f myawklib.awk -f another_main.awk

, .

  • MD
+1

unixtools - , . ...

0

runawk.

RunAWK is a small shell for the AWK interpreter that helps you write standalone programs in AWK. It provides support for modules and other powerful features. It comes with dozens of modules that provide an effective tool for processing command line parameters, powerful functions for managing strings and arrays, as well as for sorting, mathematical, tmpfile, braceexpand functions and many others.

http://sourceforge.net/projects/runawk

http://awk.info/?tools/runawk

0
source

All Articles