: (colon)

expand arguments and do nothing, successfully

KornShell Built-in


SYNOPSIS

: [argument...]


DESCRIPTION

The : (colon) command simply yields an exit status of zero (success). It does expand its arguments but does nothing with them. This can be surprisingly useful, for example, when you are evaluating shell expressions for their side effects.


EXAMPLES

: ${VAR:="default value"}
sets VAR to a default value if and only if it is not already set.


DIAGNOSTICS

Since this command always succeeds, the only possible exit status is:
0
Successful completion.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0.


NOTE

This is a special built-in command of the MKS KornShell.


SEE ALSO

Commands:
sh, true


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]