Simple bash question - as usual.
bla=“groucho chico harpo zeppo”
for searchterm in $bla
In the above variable bla, how do I force the loop to read two terms separated by a space as one.
At the moment the loop will go through groucho to zeppo individually, so how do enter a variable such as “harpo zeppo” read as one item ?
I tried the manuals and all I can find and could not get a simple solution.
Ususually you would use “’“harpo zeppo”’” etc tricks but they dont work either.
So how would $bla look like below to read $searchterm in the loop as “groucho” “chico” "harpo " “zeppo” “harpo zeppo” ?
bla="groucho chico harpo zeppo <harpo zeppo>"
(something needs to replace “<” and “>” above to make “harpo zeppo” a single entity when read by the loop variable $searchterm )