So I have a bunch of files that I want to edit at once using sed
but the problem is that I need to edit a line and change the text to a file name stored in variable filename. Every time I tried, it changes the text to the literal "filename" and I don't know how to fix it.
The command I've used is:
sed -i 's/$x/'$filename'/g' *.html