Possible duplicate:sed: delete using another delimiter
I can replace the line in the file as follows
sed "s|$PATH_WITH_SLASH||" file
but i can't delete it
sed "|$PATH_WITH_SLASH|d" file
The problem is that the symbol | cannot be used for removal. What for?
If you use a different character as an address delimiter, you need to use a backslash before the first char. So
/address/
or
\|address|