While in a Linux shell I have a string which has the following contents:
cat dog bird
and I want to pass each item as an argument to another fu
if you use bash, setting IFS is all you need:
$ x="black cat brown dog yellow bird" $ IFS=$'\n' $ for word in $x; do echo "$word"; done black cat brown dog yellow bird