I am trying to store the content of a text file in one variable and using that variable as body in email sending. Below is the code to store the value in variable
ct=`cat a.txt`
I tried with
ct="`cat a.txt`"
The issue is, when I am executing the script as sh script.sh. The whole contents of a.txt are getting stored in variable ct.
But when I am executing the script without the sh extension (i.e. script.ksh). Only few contents are storing is variable ct. I am not able to trace what the issue is. Need your help.