3 ms·
The GNU echo is designed to be useable on a variety of systems which had different traditional behaviours - this comment in the source code is instructive: /
by caf 12y ago
The GNU echo is designed to be useable on a variety of systems which had different traditional behaviours - this comment in the source code is instructive:
/* System V machines already have a /bin/sh with a v9 behavior.
Use the identical behavior for these machines so that the
existing system shell scripts won't barf. */
(BSD systems supported suppressing newline with -n; UNIX System V systems supported \ escape sequences; POSIX came later and allowed either unless the XSI option is supported).
- muyuu 12y agoYep, including all that hydra-style-compatibility as part of the very base implementation of anything, is part of what makes GNU code the way it is. I mean... in main() there's a labeled goto for "just_echo" - even that section alone has something like 6 or 7 indentation levels. If I was writing satire code of GNU style I'd probably wouldn't have gone so far. Hehehe.