I am trying to prepend and append some data to each line in a file. This works with hard coded literal data, but I can't get it to work a variable. I have tried thes instructions, but instead of prepending and appending what is contained in $mkred, the instruction is putting in '$mkred'.
sed -i 's/^/$mkred/' temp.txt # prepend to all
sed -i 's/^/\$mkred/' temp.txt # prepend to all