4 ms·
"Though a program be but three lines long, someday it will have to be maintained." I am instantly reminded of /bin/true which originally was a 0 byte length fi
by thyrsus 3y ago
"Though a program be but three lines long, someday it will have to be maintained."
I am instantly reminded of /bin/true which originally was a 0 byte length file with the execute bits set. Then the edict came down that all programs were to bear an AT&T copyright...
- marcosdumay 3y agoIt's always nice to run "/bin/true --version". On my machine it's on version 8.32. But it's a program that run many more commands than just true. It's a good reminder that things are always more complicated than they seem.
- zamadatix 3y agoAdding on to the complexity of things: I have a /bin/true but, as noted by /bin/true --help, my shell has its own true as well!
- martincmartin 3y agotrue.
- unwind 3y agoThe source for GNU's true (from coreutils [1]) seems to be 80 lines which is ... infinitely more than 0 of course, but still quite manageable especially for a core utility. Oh, and I "love" how the coreutils code considers string comparison to be hard enough to warrant a macro (in system.h [2]): #define STREQ(a, b) (strcmp (a, b) == 0) [1]: https://github.com/coreutils/coreutils/blob/master/src/true.c https://github.com/coreutils/coreutils/blob/master/src/true.... [2]: https://github.com/coreutils/coreutils/blob/master/src/system.h https://github.com/coreutils/coreutils/blob/master/src/syste...