Is sed delete command broke?
Chey
chey.smith at gmail.com
Wed Jan 4 17:22:05 UTC 2006
Cristian,
Thank you. I guess that's all I was looking for. I thought I new
sed enough to think that was a problem. Silly me!
Chey
On 1/3/06, Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com> wrote:
> On Tue, 3 Jan 2006, Chey wrote:
>
> > Sorry, I didn't mean to upset you.
>
> Don't worry. Some of us get upset for nothing ;-)
>
> > I guess my beef is with sed itself then. I would think you should be
> > able to use a different delimiter with every sed command.
>
> And yes, you can.
>
> > I guess I'm not sure why sed doesn't work that way.
>
> But it does.
>
> > To me it would seem more beneficial.
>
> In that case, try this:
>
> # sed '\,^root.*,d' /etc/passwd
>
> Read more here:
>
> http://www.gnu.org/software/sed/manual/html_chapter/sed_3.html#SEC4
>
> `\%regexp%'
> (The % may be replaced by any other single character.) This also
> matches the regular expression regexp, but allows one to use a
> different delimiter than /. This is particularly useful if the regexp
> itself contains a lot of /s, since it avoids the tedious escaping of
> every /. If regexp itself includes any delimiter characters, each must
> be escaped by a backslash (\).
>
> > Sorry to waste your time but thanks for your input.
>
> The only stupid questions are those never asked.
>
>
> Cheers,
> Cristian
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
More information about the busybox
mailing list