I've spent as couple hours searching in vain for an example of how to pass parameters to an executable awk script. Can anyone lead me to such an example? I tried the following syntax:
#!/bin/gawk -v "var=$1" -f
begin {
print "var=" var
}
Using the command:
>myscript.awk <value>...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.