: - Expand arguments and do nothing, successfully
: [argument ...]
This command is a Korn-shell built-in command.
The colon (:) command simply yields an exit status of zero (success). It does expand its arguments. This can be useful, for example, when you are evaluating shell expressions for their side effects.
: ${VAR:="default value"}
Sets VAR to a default value, but only if it is not already set.
Because this command always succeeds, the only possible exit status is:
Value | Description |
---|---|
0 | Successful completion. |