Properly escaping forward slash in bash script for usage with sed
You don't actually need to bother with escaping the /
. From the GNU sed
manual:
The
/
characters may be uniformly replaced by any other single character within any givens
command.
For example:
echo 'foobar' | sed -e 's#foo#bar#'
gives the output
barbar