The recursive implementation of /bin/true
Here is the source code to /bin/true in Solaris (via
The Daily WTF):
#!/usr/bin/sh
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
# All Rights Reserved
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
# The copyright notice above does not evidence any
# actual or intended publication of such source code.
#ident "@(#)true.sh 1.6 93/01/11 SMI" /* SVr4.0 1.4 */
/bin/true simply exits successfully, and Solaris implements this as a shell script. There’s a lot to laugh about on a Friday afternoon, but a thought struck me: What exactly is the copyright notice copyrighting? Not any implementation code: This “implementation” of /bin/true doesn’t do anything, so it has no executable code. Not the idea of implementing /bin/true as a shell script without implementation code: you’d need a patent to protect that idea.
I conclude that the copyright notice is protecting… The copyright notice! There is a delicious self-reference there in the style of
Gödel, Escher, Bach…