bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a bug in 'comm', v5.2.1?


From: Bob Proulx
Subject: Re: a bug in 'comm', v5.2.1?
Date: Mon, 20 Nov 2006 18:42:38 -0700
User-agent: Mutt/1.5.9i

address@hidden wrote:
> See the attachments commf1f2.xxx; they both were generated as an output of
> "comm -3 f0 f1" with the different binary's versions. I need the  
> output like it is in 'commf1f2.122'.
> Is there a solution (or work around) for my problem?

The files f0 and f1 were not sorted in my locale.  Were they sorted in
your locale?

  sort -c f0
  sort: f0:2: disorder: /home/jf/test
  123                   4 Nov 19

  sort -c f1
  sort: f1:2: disorder: /home/jf/test
  123                   4 Nov 19

The comm info page says:

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

If I sort the files first then I get the same answer that you had in
your commf1f2.122 file.  I can do this on the fly using a bash'ism.

  comm -3 <(sort f0) <(sort f1)

I have LC_COLLATE=C in my environment.  What do you have in your
environment?  You can dump all of the settings with the locale
command.  With a different locale setting a different sort ordering
may be achieved and therefore a different comm result.

  locale

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]