BASH while loop explained with examples
This guide will walk you through the fundamentals of using while loops in Bash. In addition, we will demonstrate how to change the course of a loop by utilizing the break and continue statements in the appropriate places.
Source: FOSS Linux