All,
I have an input file:
$cat t.txt
A B C D
$cat t.sh
while read line
do
echo $line
done < t.txt
$./t.sh
A B C D
My question is: How do I "keep" the spaces? I would like the variable to hold the entire formatted line of the input file ("A B C D"). I know I can use awk, however would like to know if I can do in shell.
Thanks
JS
I have an input file:
$cat t.txt
A B C D
$cat t.sh
while read line
do
echo $line
done < t.txt
$./t.sh
A B C D
My question is: How do I "keep" the spaces? I would like the variable to hold the entire formatted line of the input file ("A B C D"). I know I can use awk, however would like to know if I can do in shell.
Thanks
JS