[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: incorrect output from JOIN
From: |
Bob Proulx |
Subject: |
Re: incorrect output from JOIN |
Date: |
Thu Dec 5 00:03:01 2002 |
User-agent: |
Mutt/1.4i |
Barry Gould <address@hidden> [2002-12-04 13:14:54 -0800]:
>
> Oddly, on Linux, it is not working correctly; it misses some lines when
> comparing files of IP's.
Thank you very much for providing a small test case which could be
tested. That is critical.
> Linux:
> # join --version
> join (textutils) 2.0.21
> # rpm -q --whatprovides /usr/bin/join
> textutils-2.0.21-1
[Very, very small nit. You probably really want to use --file instead
of --whatprovides as /usr/bin/join is not truly a capability in the
package sense of the word. Try 'rpm -qf /usr/bin/join'. In this case
it is the same information.]
> With the data below, Linux join is missing the "192.168.11.254" lines from
> it's output. (executed "join file1 file2")
Hmm... I can't recreate your failure. I tried 'join file2 file1' and
that line was produced. I was using the latest coreutils-5.4.3 which
is the continuation of textutils, shellutils, and fileutils.
I am wondering if your LANG variable is causing trouble here. That
has been notorious for similar problems. A particular vendor sets
that without giving you any choice or notification and therefore this
comes both as a problem and as a surpise to many users.
If LANG is set then programs are required to follow the collating
rules of the operating system. I am just going to jump in with this
as the likely problem. Please report back. You can read about the
details here.
man strcoll
http://www.unix-systems.org/single_unix_specification_v2/xcu/join.html
What does the output of 'locale' say?
locale
Try unsetting LANG, or setting LC_ALL to POSIX and try the test again.
export LC_ALL=POSIX
Bob
--
Please follow up to the mailing list and not to me privately unless it
is personal.