I am trying to replace a path in an input file.     #include ../../../Plumed.h         #### this is old patch in input     #include /usr/local/include/Plumed.h  #### this should be the new pathAfter seeing to previously answered question (https://stackoverflow.com/questions/11245144/replace-whole-line-containing-a-string-using-sed). I tried this.    sed -i '/../../../Plumed.h/c\/usr/local/include/Plumed.h' ../dist0.xvg    perl -i -pe 's/../../../Plumed.h/usr/local/include/Plumed.h/g' ../dist0.xvgI believe sed/perl is getting confused but I am not sure how to overcome this. Any help will be appreciated. 
How to replace a line in a input file using sed/awk/perl
linux;sed;awk;perl
If you're using / as delimeter with sed, a solution could be:sed -i 's/..\/..\/..\/Plumed.h/\/usr\/local\/include\/Plumed.h/g' fileor, you can use a different delimeter than /, for example ::sed -i 's:../../../Plumed.h:/usr/local/include/Plumed.h:g' fileAnother way with awk:awk '{ gsub(../../../Plumed.h,/usr/local/include/Plumed.h); print $0}' file