I'm having some trouble writing a do-while loop in bash with multiple conditions.
My code currently works when it is like this:
while
count=$((count+1))
( MyFunction $arg1 $arg2 -eq 1 )
do
:
done
But I want to add a second condition to the "do-while" loop like so:
while
count=$((count+1))
( MyFunction $arg1 $arg2 -eq 1 ) || ( $count -lt 20 )
do
:
done
When I do this I get an "command not found error".
I've been trying some of the while loop examples from this post but had no luck and the do-while example I use is from here. In particular the answer with 137 likes.