You need the backticks to capture output from a command (and you probably want echo instead of print):
file1=`cat answer.txt`
echo $file1
You need the backticks to capture output from a command (and you probably want echo instead of print):
file1=`cat answer.txt`
echo $file1