Consider a ASCII text file (lets say it contains code of a non-shell scripting language):
Text_File.msh:
spool on to \'$LOG_FILE_PATH/lo
If you want it in one line (I'm not a bash expert so there may be caveats to this but it works everywhere I've tried it):
when test.txt contains
${line1}
${line2}
then:
>line1=fark
>line2=fork
>value=$(eval "echo \"$(cat test.txt)\"")
>echo "$value"
line1 says fark
line2 says fork
Obviously if you just want to print it you can take out the extra value=$()
and echo "$value"
.