Loops through a block of commands while a condition is true.
Show allUsagesExamplesRelated
while (condition) ... end
The while statement tests condition and if it’s true, loops over the instructions between the while and end statements, then repeats.
set i = 0 while ( $i < 10 ) set i = `$i+1` echo $i end
for
foreach