GNU bug report logs - #34347
comm: add 2nd error message after output

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Wed, 6 Feb 2019 12:52:02 UTC

Severity: wishlist

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: 34347 <at> debbugs.gnu.org
Subject: bug#34347: At least add 2nd comm error message after output
Date: Wed, 06 Feb 2019 20:16:21 +0800
(info "(coreutils) comm invocation")

"Before ‘comm’ can be used, the input files must be sorted"
                                             ^^^^
"If an input file is diagnosed as being unsorted, the ‘comm’ command
will exit with a nonzero status (and the output should not be used).
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

"Forcing ‘comm’ to process wrongly sorted input files ... is not
guaranteed to produce any particular output. The output will probably
not correspond with whatever you hoped it would be."

OK, so I would change the default.

The new default should be: before producing even a line of output,
check both files. If either of them is in order, print the error
message, and exit non-zero... _without any line of output!_

Because currently,

$ seq 55 > 5
$ seq 55 |tac > 5r
$ comm 5 5r
just causes the error messages to fly off the screen, leaving only the
savvy user, who checks exit values, to have any inkling that there is a
problem, and he should not order futher warships, airplanes, etc. based
on the results after all.

OR, be so kind as to add a second error message after all the output is
printed, so it won't fly off the screen.




This bug report was last modified 6 years and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.