2 ms·
> 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?).
by dolmen 3y 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-Shell-Builtins.html#index-_003a https://www.gnu.org/software/bash/manual/html_node/Bourne-Sh...