I have the followingDEFAULT_M2_DIR=/home/$USERNAME/m2read -p M2 Dir?[$DEFAULT_M2_DIR] M2_DIRM2_DIR=${M2_DIR:-$DEFAULT_M2_DIR}sed -i s/M2_DIR/$M2_DIR/g filename.txtwhile trying to replace the literal string, M2_DIR, in filename.txt to /home/<userid>/m2 I'm getting the following error:sed: -e expression #1, char 11: unknown option tos'`Any idea, what am I missing?
sed with variable substitution
shell script;sed