I want to read a one-line text and split them, so I decided to use read
command.
When I try like this,
$ echo 'a b c d' | while read -a VARARR ; do echo ${VARARR[@]}; done
a b c d
All works fine, but It seems like while
command is redundant, so I tried
$ echo 'a b c d' | read -a VARARR
But, this does not work. Why?