is there a way to pass a variable into an awk statement from out site the statement?
variable="hello world"
cat file| awk '
{
print "variable from outside awk:"variable
}'
where would we all be w/out awk...
thanks vlad, I kept trying to use sub, but tried to add it into the name= line somehow. just as an additional line afterwards and it works fine.
sometimes i feel like i should have been a florist or something other than a programmer. thanks again.
how can I remove trailing space in the name variable in the following script:
cat flinf|$search1|$search2| awk '
{
ref_cmd=substr($0,34,20)
if ($0~/\.txt/) {...
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.