Ubuntu AMD64 8.10.
[EMAIL PROTECTED]:~$ echo '\' | mawk '{ gsub( /\\/, "\\\\" ); print }'
\
[EMAIL PROTECTED]:~$ echo '\' | mawk '{ gsub( /\\/, "\\ \\" ); print }'
\ \
The syntax is fine, it's all single-quoted. The submitter left out a print,
though. You can check that mawk is getting the right args and input with
strace -eexecve,read,write mawk
That produces a veritable forest of backslashes, so you can definitely see that
they're not being eaten by bash.
There seem to be a few bugs in mawk's gsub: e.g.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=100808
This bug is a different kind of wrong matching of regexes, so I didn't
mark this bug as being the same bug, though.
--
gsub does not handle \ consistently
https://bugs.launchpad.net/bugs/102208
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs