“while :” vs. “while true” [duplicate]

from manual:

: [arguments]
No effect; the command does nothing beyond expanding arguments and performing any specified
redirections. A zero exit code is returned.

As this returns always zero therefore is is similar to be used as true

Check out this answer: What Is the Purpose of the `:’ (colon) GNU Bash Builtin?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)