Code:
root@reactor:/etc/rc.d/lutelwall# service=$(echo $aservice | gawk '{ gsub("\\\(.*\\\)","") ; print }' )
gawk: warning: escape sequence `\(' treated as plain `('
gawk: warning: escape sequence `\)' treated as plain `)'
root@reactor:/etc/rc.d/lutelwall# service=`echo $aservice | gawk '{ gsub("\\\(.*\\\)","") ; print }' `
root@reactor:/etc/rc.d/lutelwall#
So, it isn't a big deal, I'm just curious if anyone has a good idea why the above gawk function gives the warning when $() are around it, but when using backticks, it's fine. In theory, I should be able to use $() right?
This line is from a much larger script, which I went through the other day and replaced literally dozens of gawk+backtick usage with $() to modernize it, and every other instance seems fine; just this single line acts up.
I can leave the backticks, but would like to know what it is about this particular line that's so special..
Sasha