Sed Error Unknown option to 's' + Solution
Mar 2, 2011 · 1 minute readCategory: linux
This is post is now quite old and the the information it contains may be out of date or innacurate.
If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub
Every example you see using sed specifies / as a delimiter.
Now what if your pattern actually includes a slash in the body text?
If you are using a variable you might not realise that you are including a slash.
Easy thing to do, just switch the delimiter to something else like #
so
sed "s/find/$REPLACE/"
becomes
sed "s#find#$REPLACE#"
and hey presto it works!