|
getting spaces while reading file from for loop
Hi ,
I am getting similar problem,
but in my case i am fetching variable value from a file , and then echo the value, but its considering spaces in the file. for exmp:
file - temp1 has contents in quotes
"group name used to communicate with x service"
"group name used to communicate with y service"
i used for loop :
for var in `cat "temp1"`
do
echo "DESC=$var;"
done
the desired output is
DESC="group name used to communicate with x service";
DESC="group name used to communicate with y service";
however, the output coming is
DESC="group";
DESC="name";
its reading spaces also...
Pls suggest...............
Thanks in advance
Aparna
|