bug-gnu-utils
[Top][All Lists]
Advanced

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

I don't think I need to sort before join always


From: Dan Jacobson
Subject: I don't think I need to sort before join always
Date: 03 Sep 2001 09:33:50 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

In File: textutils.info,  Node: join invocation, we see:

I>      join [OPTION]... FILE1 FILE2
I> 
I>   FILE1 and FILE2 should be already sorted in increasing textual
I> order on the join fields, using the collating sequence specified by the
I> `LC_COLLATE' locale.

Why the above warning that I must sort the files first when the
following works fine:
$ cat file1
a 1
c 33
b 44
$ cat file2
a 1
c 123
b 44
$ join file1 file2
a 1 1
c 33 123
b 44 44
If I had to sort the files first, there would be no way to unsort them
back to the previous intentional ordering.  Being that join works
satisfactorily for me in the above example, why the overly restrictive
warning?  Maybe you could warn: "... OK, the files don't need to be
sorted, but they must be of same number of lines, and each line must
have the same matching field in file 1 and file 2."[?]
-- 
http://www.geocities.com/jidanni Tel+886-4-25854780



reply via email to

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