If you really want to read a line as a sequence of words, your best bet in bash is to read it into an array:
$ read -a words
And now a few words from our sponsor
$ echo ${#words[@]}
8
$ echo "${words[3]}"
few
But that's not the way to pass arguments to a shell script. read just splits lines into words using whitespace (or whatever IFS is set to.) It does not:
- Handle quotes
- Allow the insertion of shell variables
- Expand pathname patterns
Passing arguments on the command line lets you do all of the above, making the utility more convenient to use, and does not require any extra work to extract the arguments, making the utility easier to write.