Hi John, Thank you for your ansewer.
I don't have any error anymore, but the file remains unchanged :( Any ideas ? Warm Regards, MARG John W. Krahn wrote: > 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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>