Is there a way to source functions and variables from a file with awk?
What I am looking for is a way sourcing/including functions and variables in a similar way we do for shell scripts:
I tried source, include but I get:
awk 'BEGIN{ include /tmp/awk-functions }{myfunc}' file
awk: fatal: division by zero attempted
Is it possible?
I believe igawk
is what you're looking for:
http://linux.about.com/library/cmd/blcmdl1_igawk.htm
Want an AWK that implements '@include'