Quote:
Originally Posted by seebee
sed -i 's/SAUPDATEARGS=""/SAUPDATEARGS="${ARGS}"/' update_sare
|
Bash doesn't perform variable substitution in single quotes. Also, double quotes aren't special inside single quotes.
Code:
sed -i 's/SAUPDATEARGS=""/SAUPDATEARGS='"${ARGS}"'/' update_sare
Notice the single quotes around the double-quoted variable. The first single quote ends the single-quoted string, and the second one starts it again. And in bash, strings that are stuck together with no space in between are concatenated.