Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2002 12:15:02 +0100
From:      Cliff Sarginson <cls@raggedclown.net>
To:        questions@freebsd.org
Subject:   Re: is there a "replace command" ?
Message-ID:  <20021203111502.GD694@raggedclown.net>
In-Reply-To: <Pine.GSO.4.44.0212031138020.19508-100000@kvist.cs.umu.se>
References:  <20021203103346.GG56031@freepuppy.bellavista.cz> <Pine.GSO.4.44.0212031138020.19508-100000@kvist.cs.umu.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 03, 2002 at 11:42:05AM +0100, Paul Everlund wrote:
> On Tue, 3 Dec 2002, Roman Neuhauser wrote:
> 
> > # tdv94ped@cs.umu.se / 2002-12-03 11:13:39 +0100:
> > > On Tue, 3 Dec 2002, Malik Blent wrote:
> > > > But my expression has "/" that is there is a "/" in a expression
> > > > What shall i do ?
> > > > my expression is "new: 11"  I want to change "new: 11"  with "new/11"
> > > >
> > > > thanks
> > >
> > > # echo "new: 11" | sed s/new\:\ 11/new\\/11/
> >
> >     you don't have to use slashes for the delimiters. see sed(1).
> >
> >     roman@freepuppy ~ 1003:0 > echo "new: 11" | sed 's,: ,/,'
> >     new/11
> >     roman@freepuppy ~ 1004:0 > echo "new: 11" | sed 's:\: :/:'
> >     new/11
> >     roman@freepuppy ~ 1005:0 > echo "new: 11" | sed 's-: -/-'
> >     new/11
> 
> Thanks for the tip! I wasn't aware of that. When it comes to man sed(1):
> Reading a Kafka book is light weight reading compared to that man
> page. :-)
> 
Mmm, it ought to be in lights.
Problem with sed is that it has a set of advanced features that very few
people ever work out how to use. Simple facts like the possibility of
using another string delimiter probably get lost in the melee. The
advanced features could probably be wripped out and I doubt if anyone
would notice...
-- 
Regards
   Cliff Sarginson 
   The Netherlands

[ This mail has been checked as virus-free ]

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021203111502.GD694>