Was : actually designed for commenting? If so, at what point did it become
a command that always returns zero exit status? Was it always built-in, or
did it originally have a separate filesystem existence (like "[")? Python
has a useful "pass" command, but : is much nicer because you can
"comment"
out a single command in (e.g.) an if/then and it remains syntactically
valid and executable. I find it very elegant.
Terry
On Sat, Jan 4, 2020 at 10:40 PM Warner Losh <imp(a)bsdimp.com> wrote:
On Sat, Jan 4, 2020, 3:11 PM Dave Horsfall <dave(a)horsfall.org> wrote:
On Sun, 5 Jan 2020, Dave Horsfall wrote:
The Unix philosophy, perhaps i.e. keep it simple?
Why have ":" (an
actual internal Shell command) when "" (the null command) will do the
job?
Also, remember that ":" was also used as a comment, before "#" was
used.
I thought it was a null label for a goto target... :)
Warner
-- Dave