Infinite loop in bash

An infinite loop is a sequence of instructions which loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over.  We can use ':' special command with while loop to tests or set an infinite loop or an endless loop.

The format should like as below.

while :
       if cond1


Leave a Reply