"Joseph A. Wiencko, Jr." <[EMAIL PROTECTED]> writes:

> "there exists no collating sequence in which this should be the
> behavior of comm -- it is contrary to the basic, stated behavior of
> comm REGARDLESS OF THE COLLATING SEQUENCE".

This misunderstands the specification of comm.  The coreutils
documentation says:

  Before `comm' can be used, the input files must be sorted using the
  collating sequence specified by the `LC_COLLATE' locale.

  
<http://www.gnu.org/software/coreutils/manual/html_mono/coreutils.html#comm-invocation>

The POSIX documentation says the same thing in a different way:

  If the lines in both files are not ordered according to the
  collating sequence of the current locale, the results are
  unspecified.

  <http://www.opengroup.org/onlinepubs/009695399/utilities/comm.html>

These specs make it clear that if you give `comm' unsorted input,
`comm' is entitled to do whatever it pleases (short of looping or
dumping core; the GNU coding standards wouldn't allow that).  It
doesn't matter whether there is an alternative universe in which
the input was actually sorted.

Personally I think `comm' should print a diagnostic if the input is
unsorted.  I'd welcome a patch along those lines, if it didn't slow
down `comm' too much in the normal case (that's the hard part :-).


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to