Join incompatibility between RHEL 6 and RHEL 7
Environment
- Red Hat Enterprise Linux (RHEL) 6
- Red Hat Enterprise Linux (RHEL) 7
- coreutils-8.4-46.el6 or older
Issue
Our users report incompatibility in join
command between RHEL 6
and RHEL 7
.
- On
RHEL 6
:
# echo a b | join -v 2 -1 1 -2 2 /dev/null -
a b
- On
RHEL7
:
# echo a b | join -v 2 -1 1 -2 2 /dev/null -
b a
This leads to unexpected scripts behaviour
Resolution
Update to coreutils-8.4-47.el6
released with Advisory RHBA-2018:1862 or newer.
Root Cause
There had been a join
bug in coreutils
since the very beginning, fixed in coreutils-8.10
, see corresponding changelog record:
join -v2 now ensures the default output format prints the match field
at the start of the line when it is different to the match field for
the first file. [bug present in "the beginning".]
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments