Problem with using "until" in "bash script"
I don't understand why it doesn't print 0 :
z=0 until (($z < 1)) do echo $z done
I don't understand why it prints 2 (2 is not less than 1) : output:
z=2 until (($z < 1)) do echo $z done
output:2
• 1,067 views
•
link
0 answers
No answers yet.
Log in to answer this question.
You're confused with the
whileloop.BASH has an until loop: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_09_03.html
From that link:
By the way this is not a bioinformatics question.
Yeah that's what I mean, it is kind of the opposite of
whileloop. OP seemed to expectwhilebehavior.Hello Afagh!
We believe that this post does not fit the main topic of this site.
Not a bioinformatics question
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!