[please don't top-post on technical lists] On 02/14/2011 05:22 PM, Batson, Brannon wrote: > Sorry, when I said 'join -v 1 d c', I meant 'join -v 1 b a'. The only files > involved are a & b which I sent contents for. > > The fundamental problem is that join and sort disagree on what 'sorted' means > in this case.
You didn't read my earlier comment: > Coreutils 5.97 is OLD. The latest stable release is 8.10, and it has > improved diagnostics for helping you discover sorting problems with join: > > join --help reminds you that: > > Important: FILE1 and FILE2 must be sorted on the join fields. > E.g., use ` sort -k 1b,1 ' if `join' has no options, > or use ` join -t '' ' if `sort' has no options. sort and join DO agree on what 'sorted' means, but ONLY if you use the right options to one or the other program. The difference in their default behavior is an unfortunate wart of POSIX, but we can't change it now, because 30 years of scripts rely on this difference. So the best you can do is to follow directions and use the correct sorting for the task at hand, by supplying the right options to sort and/or join. -- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
