From my linux experience...
To pass argument SHELLARGUMENT to awk from a shell do:$ awk -v x="$SHELLARGUMENT" '{print x}'eg.:#!/bin/shSHELLARGUMENT=testawk -v x="$SHELLARGUMENT" '{print x}'
$ awk -v x="$SHELLARGUMENT" '{print x}'
#!/bin/shSHELLARGUMENT=testawk -v x="$SHELLARGUMENT" '{print x}'
No comments:
Post a Comment