Mail Archives: djgpp/1997/07/04/12:45:04
Does anybody know of a way to allow the use of escaped characters (\n, \b,
\t for newline, backspace, tab) in regexps for `grep' and `sed'? I want to
process `man'-type files into ASCII by deleting any character followed by a
backspace. But the seemingly obvious
sed "s/.\b//" <in >out
doesn't work (since \b matches a line begin or something.) Neither does
sed "s/.\010//" <in >out
where 010 is octal for the BS char. Under bash, I can do a really ugly
workaround with `echo -e' and back-quotes. But if someone knows a better
way, I'd like to hear it.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -