RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1434468 - /usr/bin/join displays fields in wrong order for unpairable lines
Summary: /usr/bin/join displays fields in wrong order for unpairable lines
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: coreutils
Version: 6.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Kamil Dudka
QA Contact: Radka Brychtova
URL:
Whiteboard:
Depends On:
Blocks: 1461138 1494481
TreeView+ depends on / blocked
 
Reported: 2017-03-21 14:48 UTC by Renaud Métrich
Modified: 2021-09-09 12:12 UTC (History)
8 users (show)

Fixed In Version: coreutils-8.4-47.el6
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-06-19 05:09:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
[PATCH] join: print fields in the correct order for unpaired lines (3.19 KB, patch)
2018-03-09 11:25 UTC, Kamil Dudka
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1862 0 None None None 2018-06-19 05:09:32 UTC

Description Renaud Métrich 2017-03-21 14:48:24 UTC
Description of problem:

Per join(1) manpage, the "join" utility is supposed to print the "Join field", then remaining fields from FILE1, then remaining fields from FILE2:

"Default FORMAT outputs  the  join  field, the remaining fields from FILE1, the remaining fields from FILE2, all separated by CHAR."

When printing unpairable lines from FILE2 (using the "-v 2" option) and specifying the second field as "Join field" (using the "-2 2" option), the fields are printed in wrong order.


Version-Release number of selected component (if applicable):

coreutils-8.4-46.el6


How reproducible:

Always

Steps to Reproduce:

$ echo "a b" | join -v 2 -2 2 /dev/null -

Actual results:

"a b"

Expected results:

"b a"

Additional info:

The issue is not present on RHEL7 (coreutils-8.22).
The issue happens only when printing unpaired lines of FILE2.

Everything works with FILE1 as shown below:

$ echo "a b" | join -v 1 -1 1  - /dev/null
a b

Joining on second field, displaying unjoinable lines from first file:
$ echo "a b" | join -v 1 -1 2  - /dev/null
b a

Comment 3 Kamil Dudka 2017-04-03 16:47:53 UTC
Sorry for replying late on this!

This bug seems to be fixed as a side effect of the following upstream commit:

http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.9-32-gd4db0cb

I am able to extract the fix out of the above commit...

Comment 9 Jarek Polok 2018-03-09 09:21:00 UTC
Any new about release date please ?

Thanks

Jarek

Comment 10 Kamil Dudka 2018-03-09 11:23:05 UTC
(In reply to Jarek Polok from comment #9)
> Any new about release date please ?

We do not (and cannot) advertise release dates through Bugzilla.  Anyway, I will attach an unofficial patch for this bug in case you want to rebuild the package on your own.  Needless to say that you are out of support if you take this route.

Comment 11 Kamil Dudka 2018-03-09 11:25:10 UTC
Created attachment 1406245 [details]
[PATCH] join: print fields in the correct order for unpaired lines

Comment 15 errata-xmlrpc 2018-06-19 05:09:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1862


Note You need to log in before you can comment on or make changes to this bug.