Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

while command in Linux with example

  • Last Updated : 27 May, 2019

while command in Linux is used to repeatedly execute a set of command as long as the COMMAND returns true. The test command is given and all other commands are executed till the given command’s result satisfies, when the command’s result become false, the control will be out from the while command.


while COMMANDS; do COMMANDS; done



  • help while : It displays help information.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!