The while Statement
You can use the while
statement to execute a series of commands while a specified condition is true
. The loop terminates as soon as the specified condition evaluates to false
. It is possible that the loop will not execute at all if the specified condition initially evaluates to false
. You should be careful with the while
command because the loop never terminates if the specified condition never evaluates to false
.
Get Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, Eighth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.