Until Loop

suggest change

Until loop executes until condition is true

i=5
until [[ i -eq 10 ]]; do #Checks if i=10
    echo "i=$i" #Print the value of i
    i=$((i+1)) #Increment i by 1
done

Output:

i=5
i=6
i=7
i=8
i=9

When i reaches 10 the condition in until loop becomes true and the loop ends.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents