From owner-freebsd-questions Tue Dec 3 3:15:16 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C37337B401 for ; Tue, 3 Dec 2002 03:15:14 -0800 (PST) Received: from post-20.mail.nl.demon.net (post-20.mail.nl.demon.net [194.159.73.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id D475243ECD for ; Tue, 3 Dec 2002 03:15:13 -0800 (PST) (envelope-from cls@raggedclown.net) Received: from [212.238.197.102] (helo=mailhost.raggedclown.net) by post-20.mail.nl.demon.net with esmtp (Exim 3.36 #1) id 18JB1F-000I9M-00 for questions@freebsd.org; Tue, 03 Dec 2002 11:15:13 +0000 Received: from localhost (localhost [127.0.0.1]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [dawn]) with ESMTP id 0CF3ED65 for ; Tue, 3 Dec 2002 12:15:12 +0100 (CET) Received: from willow.raggedclown.net (willow.raggedclown.intra [192.168.1.10]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [dawn]) with ESMTP id B740FB6F for ; Tue, 3 Dec 2002 12:15:01 +0100 (CET) Received: by willow.raggedclown.net (Ragged Clown Host [willow], from userid 1009) id 5FCAB225CC; Tue, 3 Dec 2002 12:15:02 +0100 (CET) Date: Tue, 3 Dec 2002 12:15:02 +0100 From: Cliff Sarginson To: questions@freebsd.org Subject: Re: is there a "replace command" ? Message-ID: <20021203111502.GD694@raggedclown.net> References: <20021203103346.GG56031@freepuppy.bellavista.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-Virus-Scanned: by AMaViS 0.3.12pre8 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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