3 ms·
"On my Linux system cat has a -n option, which numbers the output lines. If it were following the 'UNIX philosophy', this option would not exist." Gnu's not Un
by dllthomas 11y ago
"On my Linux system cat has a -n option, which numbers the output lines. If it were following the 'UNIX philosophy', this option would not exist."
Gnu's not Unix. "The GNU coreutils version of this on my Linux box behaves this way" is not a good way of getting at finer points of what is or is not Unix-y.
That said, -n exists in BSD cat as well. It's not required by POSIX, though.
- klibertp 11y agoMy thoughts exactly. There are implementations of cat which don't have '-n' option: http://git.suckless.org/sbase/tree/cat.c http://plan9.bell-labs.com/sources/plan9/sys/src/cmd/cat.c Not only "Gnu's not Unix", it's also not that much interested in following "Unix philosophy". Which isn't that bad, from a user perspective: users want more capable tools, even if it impedes composability a bit.