In fact, that specific case is so common that Bash provides the equivalent shorthand <source lang="bash" enclose="none">for arg ; do</source> , with <source lang="bash" enclose="none">in "$@"</source> being implied. ( But it's probably better to use the explicit form anyway.)
Another kind of loop is the <tt>while</tt> loop. It is similar to an <tt>if</tt> statement, except that it loops repeatedly as long as its test-command continues to be successful. For example, suppose that we need to wait until the file <tt>wait.txt</tt> is deleted. One approach is to "sleep" for a few seconds, then "wake up" and see if it still exists. We can loop repeatedly in this fashion:
<source lang="bash">while [[ -e wait.txt ]] ; do
Conversely, we can use an <tt>until</tt> loop to loop ''until'' a given command is successful; for example, the reverse of the above might be:
<source lang="bash">until [[ -e proceed.txt ]] ; do
Of course, this is the same as combining <tt>while</tt> with <tt>!</tt>, but in some cases it may be more readable.
Just like <tt>if</tt> , <tt>while</tt> judges <tt>true</tt> or <tt>false</tt> in the same way. Try it out yourself.