Possible Duplicate:
sed: delete using a different delimiter
I can substitute line in file like this
sed "s|$PATH_WITH_SLASH||" file
but I cannot delete it
sed "|$PATH_WITH_SLASH|d" file
The problem is that | character cannot be used for deletion. Why?
If you use other character as address delimiter, you need to use backslash before the first char. So
/address/
or
\|address|
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With