September 14, 2022
Bash Builtin Colon
: is a shell builtin command inherited from the Bourne Shell. It does nothing beyond expanding arguments and performing redirection and has return status zero. : is a no-op operator similar to true and false. In fact, command true and : both use the same function int colon_builtin() underneath.
Parameter expansions Shell’s parameter expansions are used to check and modify parameters.
Below illustrated how : is used in parameter expansion by setting a default value combined with :.
Read more