Search Results

Search: Posts Made By: GermanicGalore
5,819
Posted By GermanicGalore
awk for variable with a space
Hi experts,

why does
$ echo "one two three" | awk '{$3="my tree"; print $0}'
one two my tree

work,
but
$ var="my tree"
$ echo "one two three" | awk '{$3="'$var'"; print $0}'
awk: {$3="my...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 07:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy