Sometimes in a BASH script you need to have single quotes but the value inside them is actually a variable. Here is how to have both the single quotes and the actual value of the variable expanded.
% echo $foo bar
% echo "$foo" bar
% echo '$foo' $foo
% echo "'$foo'" 'bar'
It seems that double quotes around single quotes make the single quotes expand variables.