Hello All,
I had a file which i have copied in variable FIL, but when i do echo to FIL variable (without double quotes) it shows the content of file in un-ordered manner and even the other file name present in directory comes as part of content FIL variable whereas when i echo the FIL variable with double quotes it shows the exact content of file in FIL variable.
test is the name of file with say 50 lines
FIL is the variable in which i am storing it temporary.
Code:
FIL=`cat test`
echo $FIL
Above echo of FIL is showing absurd result.
Code:
FIL=`cat test`
echo "$FIL"
Whereas this code is showing correct result. Please explain the difference. How come all the new lines present in temp file are getting eaten and files present in directory also gets include in FIL when echoed without double quotes.
Thanks