I am trying to run my custom script on a set of grep results using the command
Code:
<custom script> | grep ^search_query: | awk '{print $NF}'
This return a result like
xyz:test\[Soluta incorrupte id\]
I need to get rid of \ character before I run my script (I am guessing they were added as escape characters)
So I modified my call as
Code:
<custom_script> | grep ^search_query: | awk 'gsub("\","");{print $NF}'
which gives me the error
awk: gsub("\","");{print $NF}
awk: ^ unterminated string
I tried a few other things using sed, but could not make it work.
Any suggestion? Thanks much to all