builtin
Bash : — no-op builtin
Performs expansions and redirections but otherwise does nothing. Useful as a placeholder or to intentionally create a fixture file. Redirection can fail before the builtin runs; it is not a way to suppress arbitrary errors. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): status=0; empty file.
Formal Syntax & Structure
bash syntaxbash
: [arguments]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| arguments | word list | Expanded arguments, ignored by the builtin. |
Return Value
exit status
Zero on success; nonzero on failure.
Working Example
Example Snippetbash
: ignoredprintf 'status=%s\n' "$?": > empty[[ -f empty && ! -s empty ]] && printf 'empty file\n'