Article View: dc.org.linux-users
Article #3830Re: general unix question (sed)
From: Michael Shields
Date: Tue, 11 Jul 1995 00:00
Date: Tue, 11 Jul 1995 00:00
25 lines
1114 bytes
1114 bytes
In article <3tsebf$i8u@news.cais.com>, Charles Meredith <chazz@cais.com> wrote:
> indierok@clark.net (aka campbell) wrote:
>
> >ok... i'm trying to do this from within a bash script...
> >first of all it works fine from the commmand line:
>
> >OLD='Jun 9 15:57'
> >NEW='Jul 9 10:10'
> >sed s/"$OLD"/"$NEW"/g file >newfile
>
> I'm not sure, but I think this should be:
>
> sed s/\"$OLD\"/\"$NEW\"/g file >newfile
That's not the same at all. It will change
This is a """string""Jun 9 15:57"xxJun 9 15:57zz
to
This is a """string""Jul 9 10:10"xxJun 9 15:57zz
which doesn't seem to be what the original posted intended.
--
Shields.
Technical Details
Message-ID:
<3tuu7b$aq6@yage.tembel.org>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3tq1pt$tp@clarknet.clark.net> <3tsebf$i8u@news.cais.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11663c,20180fab603243c7 X-Google-Attributes: gid11663c,public From: shields@tembel.org (Michael Shields) Subject: Re: general unix question (sed) Date: 1995/07/11 Message-ID: <3tuu7b$aq6@yage.tembel.org> X-Deja-AN: 106054666 references: <3tq1pt$tp@clarknet.clark.net> <3tsebf$i8u@news.cais.com> organization: Tembel's Hedonic Commune newsgroups: dc.org.linux-users