On 6/28/07, Olivier Regnier <[EMAIL PROTECTED]> wrote:
Hi everyone,

I have a file called "test" with the following lines:
###
a
b

d
e
f
###

With sed, i want to insert the "c" letter after "b" letter. Logically
simple, but not for me.

Here is my command : # sed -i.old -e "4i\c"

I have this message : sed: 1: "4i\c": extra characters after \ at the
end of i command

AFAIK, with our sed you can only do that with multiline
command:
% sed -i.old -e "4i\\<press enter>
c" test

The backslash is doubled, because shells interpret
backslash-newline as a space. With GNU sed it's
much easier.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to