while command in Linux with example
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.
Recommended Posts:
- od command in Linux with example
- du Command in LINUX
- 'dd' command in Linux
- who command in Linux
- SED command in Linux | Set 2
- less command in Linux with Examples
- Cat command in Linux with examples
- fc Command in Linux with Examples
- tar command in Linux with examples
- arp command in Linux with examples
- gdb command in Linux with examples
- wc command in Linux with examples
- col command in Linux with Examples
- rm command in Linux with examples
- last command in Linux with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



