Mail Archives: djgpp/1998/06/08/09:46:25
In <1998060802335800 DOT WAA17898 AT ladder01 DOT news DOT aol DOT com> myknees AT aol DOT com (Myknees) writes:
>In article <357aae4b DOT 6492244 AT news1 DOT bway DOT net>, jlrubin AT bway DOT net (Josh Rubin)
>writes:
>>Sed vewsion 1.18 doesn't seem to like backspaces in
>>regular expressions.
[SNIP]
>One possible way to find ways to express "backspace" & other characters to sed
>is to view a file in less.exe. If you look at the formatted man page you
>mention with less using the -U switch, or if you open the *.1 file in emacs,
>you'll see that there are a bunch of ^H characters. That is your clue that by
>typing control-H, you generate the character "backspace".
>The problem is that you need to be able to type that without the cursor going
>backward. In bash and under vi, you can do that by first typing control-v. In
>the DOS editor, EDIT, you can do that by first typing control-p. Maybe someone
>knows how to get a control-h character into an emacs buffer or onto a
>command.com command line--I don't.
I'm pretty sure that command.com won't let you - but in emacs you just
type ctrl-q ctrl-h to get a ^H. This also works in the minibuffer
(the line at the bottom of the screen), so you can do stuff like:
esc % ctrl-q ctrl-m enter enter
this gets rid of all the ugly ^M's that appear at the end of each line
in a file that was written with an ms-dos-style editor.
>If you put control-H into the regexp instead of the backslash and 'b', sed will
>match the backspace characters.
[SNIP]
>>this this specific to the DJGPP port?
>It's a feature, I think. sed isn't like awk.
>--Ed (Myknees)
Cheers
Fabian
--
Fabian Nunez, B.Sc(Hons) Collaborative Visual Computing Laboratory,
fabian AT cs DOT uct DOT ac DOT za University of Cape Town
"Ram Disk" is NOT an installation procedure!
- Raw text -