A shell colon does nothing. Use it anyway | Hacker News
TL;DR AI
2 min readKey summary
A Hacker News thread debated POSIX shell quirks, with a focus on the colon no-op builtin and parameter expansion tricks.
Commenters argued over shell’s reliability for scripting, especially around portability, validation, and error handling.
The discussion highlighted common pitfalls like filenames with spaces and command-length limits, alongside idioms experienced users depend on.
Several participants noted that the colon command is still useful in scripts for checks, defaults, and forcing errors on missing variables.
