How would you suggest to consecutively assign one variable per word of string?
I am looking for the short command: one-liner and without loop if possible. It should have of the form
echo "<sring>" | your_command
Example:
- The string is "word1 word2 word3"
- I want to assign the variable
w1
toword1
,w2
toword2
andw3
toword3
.