sed "s/HOME/$HOME/g" t
# sed: -e expression #1, char 9: unknown option to `s'
Why? The $HOME contains ‘/’, It is in conflict with separating character. So, change the separating character to ‘|’.
sed "s|HOME|$HOME|g" t
# Passed!
Over!
sed "s/HOME/$HOME/g" t
# sed: -e expression #1, char 9: unknown option to `s'
Why? The $HOME contains ‘/’, It is in conflict with separating character. So, change the separating character to ‘|’.
sed "s|HOME|$HOME|g" t
# Passed!
Over!