5.1. Why don't my variables like $var get expanded in my sed script?
Because your sed script uses 'single quotes' instead of "double
quotes." Unix shells never expand $variables in single quotes.
This is probably the most frequently-asked sed question. For more
info on using variables, see section 4.30.