why does a echo | read
behave differently to echo | while read
?
$ echo -e "1t2t3" | read a b c; echo "$a-$b-$c"
--
$ echo -e "1t2t3" | while read a b c; do echo "$a-$b-$c"; done
1-2-3
why does a echo | read
behave differently to echo | while read
?
$ echo -e "1t2t3" | read a b c; echo "$a-$b-$c"
--
$ echo -e "1t2t3" | while read a b c; do echo "$a-$b-$c"; done
1-2-3