[wplug] Escaping ; in script question
billings at negate.org
billings at negate.org
Tue Jun 10 11:04:51 EDT 2003
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
More information about the wplug
mailing list