: (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. All UNIX systems. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


NOTE

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


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC Integrity


SEE ALSO

Commands:
sh, true


PTC MKS Toolkit 10.1 Documentation Build 15.