What is Bash while loop?

The while is used to execute one or more commands (statements) until the given condition is True. As the condition becomes false, the execution moves to the next line of code outside of the while loop.

What is Bash if statement?

The if is one of the decision making statement in Bash Shell scripting. It enables us executing the one block of code (to perform certain action) among the two or more blocks.