awk command issue
Any idea on hwo to knock out the below error
root="/webroot" echo $root | awk -v r=$root '{ print "shell root value - " r}' awk: syntax error near line 1 awk: bailing out near line 1 |
The above works when using gawk and bash:
Code:
$ root="/webroot" And which shell: grep $(id -u) /etc/passwd |
My question would be ... what is the purpose of the script?
The echo is pointless. Just place BEGIN before the braces. |
For that matter, what's wrong with this?
Code:
echo "shell root value - $root" |
thanks david ,i just put a random example to seek advise.. related to it i have one complex expression
anyway Thanks a lot all.. my issue resolved |
All times are GMT -5. The time now is 09:43 PM. |