Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2001 22:40:44 +1000
From:      Edwin Groothuis <edwin@mavetju.org>
To:        Mark Rowlands <mark.rowlands@minmail.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: silly sed question
Message-ID:  <20010924224044.Q10641@k7.mavetju.org>
In-Reply-To: <20010924115816.EE2F637B418@hub.freebsd.org>; from mark.rowlands@minmail.net on Mon, Sep 24, 2001 at 01:58:12PM %2B0200
References:  <20010924115816.EE2F637B418@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 24, 2001 at 01:58:12PM +0200, Mark Rowlands wrote:
> I have a string
> 
> TARGETS='blob1 blob2 blob3'
> 
> and I wish to use to change this to 
> 
> TARGETS='blob1 blob2 blob3 blob4'    
> 
> for a multitude of files.
> 
> I am having problems with the quotes
> 
> sed -e  '/^TARGETS  s/'$/blob4'/'  myfile

You should use \' here:
	sed -e  '/^TARGETS  s/\'$/blob4\'/'  myfile

because the ''s are part of the string, not part of the characters
surrounding the string.

Edwin

-- 
Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
edwin@mavetju.org |           Interested in MUDs? Visit Fatal Dimensions:
------------------+                       http://www.FatalDimensions.org/

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?20010924224044.Q10641>