Re: uncomprehensible bug in join
Jim Meyering <[email protected]> Wed, 10 Sep 2003 17:18:20 +0200
| Newsgroups | gmane.comp.gnu.textutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Henning Rust <[email protected]> wrote: > for some uncomprehensible reasons join does not join the two files properly. > The command is > join -a 1 1.dat 2.dat > out.dat > > I also tried to shorten the gap present in 2.dat. For very smal gaps > it worked, sometimes also for larger gaps. I could not find any > systematics in the problem. > I attached the files. ... > 1944_10_29 > 1944_10_30 > 1944_10_31 > 1944_11_1 > 1944_11_2 > 1944_11_3 > 1944_11_4 > 1944_11_5 > 1944_11_6 > 1944_11_7 > 1944_11_8 > 1944_11_9 > 1944_11_10 > 1944_11_11 Your input files are not sorted. For join to work properly, they must be. If I sort the above few lines, I get this: 1944_10_29 1944_10_30 1944_10_31 1944_11_1 1944_11_10 1944_11_11 1944_11_2 1944_11_3 1944_11_4 1944_11_5 1944_11_6 1944_11_7 1944_11_8 1944_11_9