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.
while COMMANDS; do COMMANDS; done
- help while : It displays help information.