1831408 Members
3185 Online
110025 Solutions
New Discussion

script tips help

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: script tips help

>Or is there a way to use a shell variable in the body of the "awk"

If you want to use a shell variable and not a shell command as Hein shows, you use the -v option:

$awk -v VAR1="$VAR1" ... '{ print VAR1 }'

There is also the associative array ENVIRON.