I'm trying to make a sed substitution where the substitution pattern is an environment variable to be expanded, but the variable contains a "slash".
sed -e 's/<HOME_DIRECTORY>/'$HOME'/'
This gives me the following error:
sed: -e expression #1, char 21: unknown option to `s'
Obviously this is because of the slashes in the HOME variable. How do I get around this problem?