I have a string, like a sentence, and I know for sure that there are many words with at least one space separate every adjacent two. How can I split the words into individual strings so I can loop through them?
EDIT: Bash The string is passed in as an argument. e.g. ${2} might be "cat '' cat '' file". so how can I loop through this arg ${2}?
Also, how to check if a string contains spaces?