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:
- whoami command in Linux with example
- od command in Linux with example
- How to find time taken by a command/program on Linux Shell?
- mindepth and maxdepth in Linux find() command for limiting search to a specific directory.
- Netstat command in Linux
- Practical applications of 'ls' command in Linux
- 'dd' command in Linux
- 'IPCS' command in Linux with examples
- select command in Linux with examples
- grep command in Unix/Linux
- Sed Command in Linux/Unix with examples
- ZIP command in Linux with examples
- SORT command in Linux/Unix with examples
- Gzip Command in Linux
- Cat command in Linux with examples
- Head command in Linux with examples
- Tail command in Linux with examples
- wc command in Linux with examples
- tar command in Linux with examples
- atrm 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.

