MARG wrote: > Hi, Hello,
> I'm trying to change the string in .bash_profile: > PATH=$PATH:/home/bin > > to > PATH=$PATH/home/bin:/usr/local/httpd/bin > > I'm using the following: > perl -pi~ -e 's/PATH=$PATH/home/bin/PATH=$PATH/home/bin:/usr/local/httpd/bin > ' .bash_profile > > but i'm getting a lot of errors. > > What might be wrong ? Because the pattern and replacement string contain the slash (/) character you have to use a different delimiter for the substitution operator. Because the pattern and replacement string are interpolated $PATH is changed to '' in both. perl -pi~ -e's~^(PATH=\$PATH/home/bin)~$1:/usr/local/httpd/bin~' .bash_profile John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>