This is my script : sed s/bob/"$VAR"/g The trouble is VAR may contains a "/", and when there is one, it's interpreted by the BASH shell (and others) . How can i fix this ?