I have the following entry in my .bashrc:
PATH=$PATH:/home/user/abc/bin;export PATH; # ADDED BY INSTALLER - DO NOT EDIT OR DELETE THIS COMMENT
I want to substitute /home/user/abc/bin for any path that I choose. How can I do this with sed?
I have the following:
sed 's,PATH=[^;]*,PATH=$PATH/home/user/app/2.1,' -i ~/.bashrc
But, this will substitute anything that begins with PATH, how can I specify to only select what begins with PATH but also includes the string ADDED BY INSTALLER - DO NOT EDIT OR DELETE THIS COMMENT
You do so: