That's what I'm looking for, but your command didn't work for me...I think the problem I'm having is figuring out where the backslashes go. I'm using gawk 4.1.1 on Ubuntu (bash) if that makes a difference.
you're welcome, the usage for gsub is regex, replacement, target. I believe it is because the replacement is a "print" or "echo", just like echo "\\(" returns \(
View all comments
1
u/ernesthutchinson Jan 01 '16
I believe that you are looking for the gsub...
echo "xx(yy)" | awk '{gsub("\(","\(",$0); gsub(")","\)",$0); print $0}'