Click to See Complete Forum and Search --> : sed global replace


bsh152s
09-26-2001, 03:46 PM
Does anyone know how to do a search and replace for strings with forward slashes in them (/). I'm familiar with this command:

sed "s/Search_text/Replace_text/" file > new_File

But, I'm wanting to change path names contained in many files and the sed utility gets confused when I have /'s in the two strings. Anyone have any ideas?

slayer17
09-26-2001, 10:07 PM
sed "s/\/foo/\bar/g"

something like that, hell man it is late!