I want to use 'sed' command (for example) that have two variables. One should be evaluated and other not.
For example, var1="should be evaluated" var2="should not be evaluated"
echo "should be evaluated" | sed 's|${var1}|$var2|g'
I want to see: $var2 (not value)
How to do it ? My goal is to replace one string that I get as parameter to variable name.
The problem is that a double apostrophe (") evaluated the variable and a single spostrophe (') not. And I can't understand how to use it in the same command.
Thanks, Alex