Mail Archives: djgpp/1998/06/08/20:15:27
At 03:21 6/7/1998 GMT, Josh Rubin wrote:
>Sed vewsion 1.18 doesn't seem to like backspaces in
>regular expressions.
>
>sed --expression='s/\b//g' file > output
>leaves backspaces untouched. - try it on a formatted man page.
>
>sed --expression='s/x\b//g'
>removes the 'x' but leaves the backspace!
>
>Am I doing something wrong, or is this a sed bug, or
>this this specific to the DJGPP port?
sed is not, in general, very open to escape sequences in regexps. I've found
it's necessary to use a literal backspace character. In Unix sh or bash, you
can do:
sed `echo -e 's/\b//g'`
Nate Eldredge
nate AT cartsys DOT com
- Raw text -