how to write the shell while loop syntax?

while loop is generally used for command or statement is repeatedly executed until the determination is not satisfied until the condition is false.


while loop syntax:

condition = condition
statements = statements

while [[ condition ]]; do
     #statements
done

Or write:

while <conditional expression>
do
commands
done


how to write the shell while loop syntax?

See the article at small examples -

Guess you like

Origin blog.51cto.com/14573101/2447038