[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coreutils] [PATCH] don't warn about disorder against empty input
From: |
Pádraig Brady |
Subject: |
[coreutils] [PATCH] don't warn about disorder against empty input |
Date: |
Wed, 26 Jan 2011 15:35:26 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
I notice that join doesn't warn about disorder
when there are no mismatches between the two files,
which is a good thing.
$ join -a1 <(printf '1\n0\n') <(printf '1\n0\n')
1
0
However it does warn if there is no input
in one of the files. I'm inclined to think that
the following should be treated as above?
$ join -a1 <(printf '1\n0\n') /dev/null
1
join: file 1 is not in sorted order
0
Doing that would allow one to use join to
extract fields with awk like blank handling,
and reordering support, without needing
to specify --nocheck-order.
$ printf "1 2 3\n" | join -a1 - /dev/null -o 1.3,1.1
3 1
cheers,
Pádraig.
join-null-disorder.diff
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [coreutils] [PATCH] don't warn about disorder against empty input,
Pádraig Brady <=