On 2004-06-26 12:08, antenneX <[EMAIL PROTECTED]> wrote:
> I cannot get it to work on another file (perl.pl file) to change the line:
> $OrderNumPrefix = "ATX060"; to $OrderNumPrefix = "ATX070";
> I suspect I'm not handling the quotes or other operators correctly and it
> just ignores the change.
> Here's the snippet of the script I'm trying to use:
> #!/bin/sh
> new=`grep -i new /path/to/newfile`
> old=`grep -i new /path/to/oldfile`
> sed -i.bak -e "s/$old/$new/" /path/to/myfile

The results depend heavily on the existence and contents of the two files
named /path/to/{old,new}file.  I'm sure if you change the sed line to:

    sed -i.bak -e 's/ATX060/ATX070/' /path/to/myfile

it will all work fine.

> What do I need to change to make it work....???

Something within oldfile or newfile, is a far reaching guess.

- Giorgos

[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to