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:
- who command in Linux
- du Command in LINUX
- 'dd' command in Linux
- SED command in Linux | Set 2
- od command in Linux with example
- less command in Linux with Examples
- fc Command in Linux with Examples
- rcp Command in Linux with examples
- rm command in Linux with examples
- fmt command in Linux with examples
- cd command in Linux with Examples
- arp command in Linux with examples
- wc command in Linux with examples
- cmp Command in Linux with examples
- cut 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.



