$ type : : is a shell builtin $ type true true is a shell builtin
Looks like they are the same, but they don't give the same system trace:
$ strace : strace: :: command not found $ strace true execve("/bin/true", ["true"], [/* 82 vars */]) = 0 [snip] exit_group(0) = ?
I tried diffing
strace bash -c : 2>:.txt and
strace bash -c true 2>true.txt, but couldn't find any differences between them except for the memory locations.
$ type : : is a special shell builtin $ type true true is a shell builtin
OK, so they are not the same.
help : and
help true aren't very useful, and they return the same in
dash. Is there any practical difference at all between them, except that
: saves three bytes and makes scripts less readable?