Article View: dc.org.linux-users
Article #3827Re: general unix question (sed)
From: Joseph S. D. Yao
Date: Tue, 11 Jul 1995 00:00
Date: Tue, 11 Jul 1995 00:00
15 lines
1058 bytes
1058 bytes
In article <3tq1pt$tp@clarknet.clark.net>, aka campbell <indierok@clark.net> wrote: >OLD='Jun 9 15:57' >NEW='Jul 9 10:10' >sed s/"$OLD"/"$NEW"/g file >newfile >but it won't work within a script...sed: command garbled: s/June 9 15:57 Assuming that the quotes are just to keep the strings in the variables together, and aren't part of the text being replaced, this should be exactly correct. I suspect that there's something you're not telling us. Are, e.g., the quotes being evaluated out and then the string being eval'ed? Is the "$PATH" correct? etc. -- Joe Yao jsdy@cais.com - Joseph S. D. Yao
Technical Details
Message-ID:
<3tuhr2$seh@news.cais.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3tq1pt$tp@clarknet.clark.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11663c,20180fab603243c7 X-Google-Attributes: gid11663c,public From: jsdy@cais2.cais.com (Joseph S. D. Yao) Subject: Re: general unix question (sed) Date: 1995/07/11 Message-ID: <3tuhr2$seh@news.cais.com> X-Deja-AN: 106054663 references: <3tq1pt$tp@clarknet.clark.net> organization: Hadron, Inc. [Posting from Cap. Area Internet Svcs.] newsgroups: dc.org.linux-users