How to strip edit characters
Larry Wall
lwall at jpl-devvax.JPL.NASA.GOV
Thu Sep 27 13:56:34 AEST 1990
In article <6665 at aplcen.apl.jhu.edu> ejmag at aplcen (Magnusson Eric 859-4680) writes:
: Occasionally I receive mail from others which contains editing
: characters such as backspace(^H). When this text is printed to the
: screen it appears fine, but when I try to edit it, I see all the edit
: characters like sew^H^Ho (instead of "so").
:
: Is there a "shell" way to remove the backspace characters, yet retain
: the text in its final form?
Try filtering through either of
col -b
perl -pe '1 while s/.\010//'
The col command may do extra transmogrifications to the text that you
don't want. The perl command may do extra transmogrifications to your
mind that you don't want.
Larry
More information about the Comp.unix.shell
mailing list