[wplug] Escaping ; in script question
Sal Mangiapane
salm at servanttechnology.com
Tue Jun 10 11:13:42 EDT 2003
If choosing the quoted solution, I think the ' single quotes are required. It may not work double quotes.
sal
> -----Original Message-----
> From: wplug-admin at wplug.org [mailto:wplug-admin at wplug.org]On Behalf Of
> billings at negate.org
> Sent: Tuesday, June 10, 2003 11:05 AM
> To: wplug at wplug.org
> Subject: Re: [wplug] Escaping ; in script question
>
>
> On Tue, 2003-06-10 at 10:54, Russ Schneider wrote:
> > In the following script:
> >
> > for FILE in `grep -r -s -l copy backup` ; do
> > cp $FILE $FILE.new
> > sed s#copy; 2002#copy; 2002-2003#g $FILE.new > $FILE
> > rm $FILE.new
> > done
> >
> > the process gets choked up because it things the ; in my search and
> > replace is seperating commands.
> >
> > How do I escape the ;?
>
> \;
>
> or, you can put quotes around the sed expression, i.e.
>
> sed 's#copy; 2002#copy; 2002-2003#g' $FILE.new > $FILE
> --
> Jonathan S Billings <billings at negate.org>
> TSFNKP
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
>
More information about the wplug
mailing list