Hacker News new | ask | show | jobs
by dolmen 844 days ago
> This works because the `:` is a way to set a label, and it implicitly returns 0.

Nope. Unix shell doesn't have labels (are you mixing with DOS batch files?).

: is a shell builtin that does nothing. In the bash man page, look for the first entry of the "SHELL BUILTIN COMMANDS" section. https://www.gnu.org/software/bash/manual/html_node/Bourne-Sh...