When you look at how infinite loops should be implemented, you mostly see this approach:
while :
do
# loop infinitely
done
But I just don’t understand the use of : here. Wouldn’t it be better to use:
while true
do
# loop infinitely
done
?
from manual:
As this returns always zero therefore is is similar to be used as
trueCheck out this answer: What Is the Purpose of the `:’ (colon) GNU Bash Builtin?