In a bash script, I'm trying to replace a line which starts with a comment with new text. The sed fails telling me that the hash char is an Unknown option to s
sed -i -e "s/#a line/the new line with some $varname/g" "path/to/filename"
I've tried one backslash on the # to no avail. How do I use a hash with sed, and yes, I have to use double quotes to manage the variable use.