Skip to content
Related Articles
Open in App
Not now

Related Articles

while command in Linux with example

Improve Article
Save Article
  • Last Updated : 27 May, 2019
Improve Article
Save Article

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.

Syntax:

while COMMANDS; do COMMANDS; done

Example:

Option:

  • help while : It displays help information.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!