B Belaran Registered Mar 15, 2004 #1 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 ?
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 ?
R rhg Registered Mar 16, 2004 #2 The character you specify after the sed s command is the separator character. Using the / is not mandantory. If you prefer the pipe character | as separator you can simply write s|bob|"$VAR"|g.
The character you specify after the sed s command is the separator character. Using the / is not mandantory. If you prefer the pipe character | as separator you can simply write s|bob|"$VAR"|g.