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
Use xargs:
xargs
Depending on what you want to do with each line, it could be as simple as:
xargs -n1 func < file
or more complicated using:
cat file | xargs -n1 -I{} func {}