[EMAIL PROTECTED] (Karl Berry) writes: > In coreutils 5.93, with _POSIX2_VERSION=0 (and POSIXLY_CORRECT unset), > touch foo bar > tail -3 foo bar > yields the error > tail: invalid option -- 3 > Both `tail -3 foo' and `head -3 foo bar' are ok.
Well, that's a long story. 7th Edition Unix "tail -3 foo bar" ignores "bar", and Solaris 10 "/usr/bin/tail" follows in this ancient and bogus tradition. SUSv2 (1997) requires support for "tail -3 foo" and for "head -3 foo bar", but it understandably does not require support for "tail -3 foo bar". When I ran into this a while ago, I decided not to change GNU tail to support 7th Edition Unix behavior, as that behavior is counterintuitive and confusing and no standard requires it. I thought it better to reject that usage entirely. However, if some actual programs rely on the 7th Edition Unix behavior, I suppose that would be an argument for changing coreutils "tail" to behave compatibly. The coreutils documentation says this: For compatibility @command{tail} also supports an obsolete usage @samp{tail [EMAIL PROTECTED] [EMAIL PROTECTED], which is recognized only if it does not conflict with the usage described above. This says "tail -3 foo bar" is not supported, but it does not say so explicitly. Do you think an explicit statement would be helpful? _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils