From unknown Sun Jun 15 08:43:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54625: Why do I need to specify `-o auto` for join's `-e` option to work? Resent-From: Iago-lito Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 29 Mar 2022 13:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54625 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 54625@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164856045330069 (code B ref -1); Tue, 29 Mar 2022 13:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Mar 2022 13:27:33 +0000 Received: from localhost ([127.0.0.1]:60223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZBsi-0007ou-Ld for submit@debbugs.gnu.org; Tue, 29 Mar 2022 09:27:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:58914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ6sp-0004xC-7b for submit@debbugs.gnu.org; Tue, 29 Mar 2022 04:07:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ6so-0000ZA-IU for bug-coreutils@gnu.org; Tue, 29 Mar 2022 04:07:18 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:36497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ6sl-0001bj-Tp for bug-coreutils@gnu.org; Tue, 29 Mar 2022 04:07:17 -0400 Received: (Authenticated sender: iago-lito@cleb.io) by mail.gandi.net (Postfix) with ESMTPSA id DBCDC240005 for ; Tue, 29 Mar 2022 08:07:08 +0000 (UTC) Content-Type: multipart/alternative; boundary="------------wfqIa12EFiwAXHsxpPe7QdbP" Message-ID: <5524bac6-5ac7-4238-0a07-d730dd7a4cae@cleb.io> Date: Tue, 29 Mar 2022 10:07:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US From: Iago-lito Received-SPF: pass client-ip=217.70.178.230; envelope-from=iago-lito@cleb.io; helo=relay10.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Mailman-Approved-At: Tue, 29 Mar 2022 09:27:31 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) This is a multi-part message in MIME format. --------------wfqIa12EFiwAXHsxpPe7QdbP Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello,     This is a follow-up to this (yet) unanswered post on SE U&L: https://unix.stackexchange.com/q/696259/87656, which I'm cross-posting here. Don't hesitate to fire if it's the wrong place. With the following two simple files: |a.txt| |1 a 2 b 5 c | |b.txt| |2 x 4 y 5 z | The following command does not behave like expected: |$ join -a 1 -a 2 -e 0 a.txt b.txt 1 a 2 b x 4 y 5 c z | I would expect the option |-e 0| to fill up missing values with zeroes. However, the following does work: |$ join -a 1 -a 2 -e 0 -o auto a.txt b.txt 1 a 0 2 b x 4 0 y 5 c z | Reading documentation from |$ man join|, I see no connection between |-o| and |-e| that would make the above behaviour meaningful. Instead, I find it misleading that a useless |-o auto| needs to be inserted into my command for |-e 0| to work.. Is there an explanation, to be clarified in the manpage? Or is it a bug? (btw: $ join (GNU coreutils) 9.0 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel. ) -- Iago-lito --------------wfqIa12EFiwAXHsxpPe7QdbP Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Hello,

    This is a follow-up to this (yet) unanswered post on SE U&L: https://unix.stackexchange.com/q/696259/87656, which I'm cross-posting here. Don't hesitate to fire if it's the wrong place.

With the following two simple files:

a.txt

1 a
2 b
5 c

b.txt

2 x
4 y
5 z

The following command does not behave like expected:

$ join -a 1 -a 2 -e 0 a.txt b.txt 
1 a
2 b x
4 y
5 c z

I would expect the option -e 0 to fill up missing values with zeroes. However, the following does work:

$ join -a 1 -a 2 -e 0 -o auto a.txt b.txt 
1 a 0
2 b x
4 0 y
5 c z

Reading documentation from $ man join, I see no connection between -o and -e that would make the above behaviour meaningful. Instead, I find it misleading that a useless -o auto needs to be inserted into my command for -e 0 to work..

Is there an explanation, to be clarified in the manpage? Or is it a bug?

(btw:

$ join (GNU coreutils) 9.0
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel.

)



--
Iago-lito


--------------wfqIa12EFiwAXHsxpPe7QdbP-- From unknown Sun Jun 15 08:43:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Iago-lito Subject: bug#54625: closed (Re: bug#54625: Why do I need to specify `-o auto` for join's `-e` option to work?) Message-ID: References: <5524bac6-5ac7-4238-0a07-d730dd7a4cae@cleb.io> X-Gnu-PR-Message: they-closed 54625 X-Gnu-PR-Package: coreutils Reply-To: 54625@debbugs.gnu.org Date: Tue, 29 Mar 2022 15:38:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1648568282-28067-1" This is a multi-part message in MIME format... ------------=_1648568282-28067-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #54625: Why do I need to specify `-o auto` for join's `-e` option to work? which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 54625@debbugs.gnu.org. --=20 54625: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54625 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1648568282-28067-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 54625-done) by debbugs.gnu.org; 29 Mar 2022 15:37:07 +0000 Received: from localhost ([127.0.0.1]:33408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZDu7-0007HV-Ff for submit@debbugs.gnu.org; Tue, 29 Mar 2022 11:37:07 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:37704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZDu5-0007H1-VS for 54625-done@debbugs.gnu.org; Tue, 29 Mar 2022 11:37:06 -0400 Received: by mail-wr1-f49.google.com with SMTP id u16so25408361wru.4 for <54625-done@debbugs.gnu.org>; Tue, 29 Mar 2022 08:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=VWo95Md/UFfHHM28Hgy0OG12wCuFOplAddCfNAVEAIU=; b=cwbPivoDNriO1IF+JoPLNytgBSJVaAtJqgpFtRA6ATUihReaakSNmpfjYiurR6xhH/ v6UryX7vCOQOLoadxKrZvqTZrJQJY233HLcT1xOB9HZjHWaIO4VPKGY6IZVJAsPkvZC+ peN95MYiy+HK/9IAPO9VGcVi4KYjkOvI6cgJ8ujZn8nJ7AYowdFRHYsX55bpGvCAv13s sp8a8+5AWtLvZBnE+5GYgXAibnzojmbhqLhl0o1eKvGUR+fdktx/ZnM0WnWKbffhxlJe mO+cXTaFW3Mn54eb1wQ/+jPR2d2/wTPEDS7qvXADjS3mdFnONCaAVXIDYxKgmB6tJ5Mg dr+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:references:from:in-reply-to; bh=VWo95Md/UFfHHM28Hgy0OG12wCuFOplAddCfNAVEAIU=; b=E7j3U5oNU+85+57b7OrXS8RU+apsNYFnDsk1T1k0SWn8pxEDlyG4MB3BtBgQpy9fif 6hmk/Y/vhXX6nLptPHW3OFeUG/HMBePQgCIPcpbJ4niJ+QSv+Oly+UDv2d0XgLKVhYX1 ekVdVN5QL9A1lFxpLklqM+zWUN2LnOHwScNrEEZAZe9Q37XMLKwv5tKDWQON1bxXngrA Epgx6B4wzpVl3264gHv0JdidvP9QXo+8lQyPhu41XGD3ijy4YW9abSm5Nx/NzvU9ca7B DSIskevzKAQVolsB+iuOr4GHwqpH8tPqnjT9psopEn7fKPr/jlLHSRoiox3k4sBIp8F8 UIdw== X-Gm-Message-State: AOAM531EnWmnsRx3b9Gq1kpAeNGKbDSsyFrbGDBn3fVMEPM66N0KW6L1 3ycsQWPkCGu8H+MKIkZClXE= X-Google-Smtp-Source: ABdhPJyWF6quinm2jPLv4h5A6g6M9v1IeM1j65XGjR0wFJJ6JLHZXnUDd8AaSm1SPQiP4O4K7vpc1w== X-Received: by 2002:a05:6000:2ca:b0:205:9e2d:ae37 with SMTP id o10-20020a05600002ca00b002059e2dae37mr26502150wry.128.1648568219835; Tue, 29 Mar 2022 08:36:59 -0700 (PDT) Received: from [192.168.1.9] (95-44-90-175-dynamic.agg2.lod.rsl-rtd.eircom.net. [95.44.90.175]) by smtp.googlemail.com with ESMTPSA id bg42-20020a05600c3caa00b00380deeaae72sm2645789wmb.1.2022.03.29.08.36.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Mar 2022 08:36:58 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------Z00F12XBZJNuLEd8JCqtGlb2" Message-ID: Date: Tue, 29 Mar 2022 16:36:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Thunderbird/97.0 Subject: Re: bug#54625: Why do I need to specify `-o auto` for join's `-e` option to work? Content-Language: en-US To: Iago-lito , 54625-done@debbugs.gnu.org References: <5524bac6-5ac7-4238-0a07-d730dd7a4cae@cleb.io> From: =?UTF-8?Q?P=c3=a1draig_Brady?= In-Reply-To: <5524bac6-5ac7-4238-0a07-d730dd7a4cae@cleb.io> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 54625-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) This is a multi-part message in MIME format. --------------Z00F12XBZJNuLEd8JCqtGlb2 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 29/03/2022 09:07, Iago-lito wrote: > Hello, > >     This is a follow-up to this (yet) unanswered post on SE U&L: > https://unix.stackexchange.com/q/696259/87656, which I'm cross-posting > here. Don't hesitate to fire if it's the wrong place. > > With the following two simple files: > > |a.txt| > > |1 a 2 b 5 c | > > |b.txt| > > |2 x 4 y 5 z | > > The following command does not behave like expected: > > |$ join -a 1 -a 2 -e 0 a.txt b.txt 1 a 2 b x 4 y 5 c z | > > I would expect the option |-e 0| to fill up missing values with zeroes. > However, the following does work: > > |$ join -a 1 -a 2 -e 0 -o auto a.txt b.txt 1 a 0 2 b x 4 0 y 5 c z | > > Reading documentation from |$ man join|, I see no connection between > |-o| and |-e| that would make the above behaviour meaningful. Instead, I > find it misleading that a useless |-o auto| needs to be inserted into my > command for |-e 0| to work.. > > Is there an explanation, to be clarified in the manpage? Or is it a bug? The info doc is clearer that the output of missing fields need to be explicitly enabled, https://www.gnu.org/software/coreutils/join : ‘-e STRING’ Replace those output fields that are missing in the input with STRING. I.e., missing fields specified with the ‘-12jo’ options. I agree that the man page should mention this also, which I've done in the attached. Marking this as done. thanks, Pádraig --------------Z00F12XBZJNuLEd8JCqtGlb2 Content-Type: text/x-patch; charset=UTF-8; name="join-e-usage.patch" Content-Disposition: attachment; filename="join-e-usage.patch" Content-Transfer-Encoding: base64 RnJvbSAxMjBjZTMyMWQ1Zjc2OGMwMGI5ZTE5M2FmNGVkZDVjY2NlYWE0NWUwIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/UD1DMz1BMWRyYWlnPTIwQnJhZHk/ PSA8UEBkcmFpZ0JyYWR5LmNvbT4KRGF0ZTogVHVlLCAyOSBNYXIgMjAyMiAxNjozNDoxMCAr MDEwMApTdWJqZWN0OiBbUEFUQ0hdIGRvYzogam9pbjogY2xhcmlmeSB0aGF0IC1lIG9ubHkg ZWZmZWN0aXZlIGZvciAtMTJqbyBmaWVsZHMKCiogc3JjL2pvaW4uYyAodXNhZ2UpOiBDbGFy aWZ5IHRoYXQgLWUgaXMgbm90IHN1ZmZpY2llbnQKdG8gZW5hYmxlIG91dHB1dCBvZiBtaXNz aW5nIGZpZWxkcyBmcm9tIG9uZSBvZiB0aGUgaW5wdXRzLgpSYXRoZXIgdGhlIC0xMmpvIG9w dGlvbnMgYXJlIHJlcXVpcmVkIHRvIGV4cGxpY2l0bHkKZW5hYmxlIG91dHB1dCBvZiB0aG9z ZSBmaWVsZHMuCkZpeGVzIGh0dHBzOi8vYnVncy5nbnUub3JnLzU0NjI1Ci0tLQogc3JjL2pv aW4uYyB8IDYgKysrKystCiAxIGZpbGUgY2hhbmdlZCwgNSBpbnNlcnRpb25zKCspLCAxIGRl bGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvc3JjL2pvaW4uYyBiL3NyYy9qb2luLmMKaW5kZXgg M2Q2MmNhNDNhLi5mMmZkMTcyN2IgMTAwNjQ0Ci0tLSBhL3NyYy9qb2luLmMKKysrIGIvc3Jj L2pvaW4uYwpAQCAtMjA2LDcgKzIwNiwxMSBAQCBXaGVuIEZJTEUxIG9yIEZJTEUyIChub3Qg Ym90aCkgaXMgLSwgcmVhZCBzdGFuZGFyZCBpbnB1dC5cblwKIFxuXAogICAtYSBGSUxFTlVN ICAgICAgICAgICAgIGFsc28gcHJpbnQgdW5wYWlyYWJsZSBsaW5lcyBmcm9tIGZpbGUgRklM RU5VTSwgd2hlcmVcblwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZJTEVOVU0gaXMg MSBvciAyLCBjb3JyZXNwb25kaW5nIHRvIEZJTEUxIG9yIEZJTEUyXG5cCi0gIC1lIEVNUFRZ ICAgICAgICAgICAgICAgcmVwbGFjZSBtaXNzaW5nIGlucHV0IGZpZWxkcyB3aXRoIEVNUFRZ XG5cCisiKSwgc3Rkb3V0KTsKKyAgICAgIGZwdXRzIChfKCJcCisgIC1lIFNUUklORyAgICAg ICAgICAgICAgcmVwbGFjZSBtaXNzaW5nIChlbXB0eSkgaW5wdXQgZmllbGRzIHdpdGggU1RS SU5HO1xuXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgSS5lLiwgbWlzc2luZyBmaWVs ZHMgc3BlY2lmaWVkIHdpdGggJy0xMmpvJyBvcHRpb25zXAorXG5cCiAiKSwgc3Rkb3V0KTsK ICAgICAgIGZwdXRzIChfKCJcCiAgIC1pLCAtLWlnbm9yZS1jYXNlICAgICAgaWdub3JlIGRp ZmZlcmVuY2VzIGluIGNhc2Ugd2hlbiBjb21wYXJpbmcgZmllbGRzXG5cCi0tIAoyLjI2LjIK Cg== --------------Z00F12XBZJNuLEd8JCqtGlb2-- ------------=_1648568282-28067-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Mar 2022 13:27:33 +0000 Received: from localhost ([127.0.0.1]:60223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZBsi-0007ou-Ld for submit@debbugs.gnu.org; Tue, 29 Mar 2022 09:27:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:58914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ6sp-0004xC-7b for submit@debbugs.gnu.org; Tue, 29 Mar 2022 04:07:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ6so-0000ZA-IU for bug-coreutils@gnu.org; Tue, 29 Mar 2022 04:07:18 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:36497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ6sl-0001bj-Tp for bug-coreutils@gnu.org; Tue, 29 Mar 2022 04:07:17 -0400 Received: (Authenticated sender: iago-lito@cleb.io) by mail.gandi.net (Postfix) with ESMTPSA id DBCDC240005 for ; Tue, 29 Mar 2022 08:07:08 +0000 (UTC) Content-Type: multipart/alternative; boundary="------------wfqIa12EFiwAXHsxpPe7QdbP" Message-ID: <5524bac6-5ac7-4238-0a07-d730dd7a4cae@cleb.io> Date: Tue, 29 Mar 2022 10:07:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 To: bug-coreutils@gnu.org Content-Language: en-US From: Iago-lito Subject: Why do I need to specify `-o auto` for join's `-e` option to work? Received-SPF: pass client-ip=217.70.178.230; envelope-from=iago-lito@cleb.io; helo=relay10.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 29 Mar 2022 09:27:31 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) This is a multi-part message in MIME format. --------------wfqIa12EFiwAXHsxpPe7QdbP Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello,     This is a follow-up to this (yet) unanswered post on SE U&L: https://unix.stackexchange.com/q/696259/87656, which I'm cross-posting here. Don't hesitate to fire if it's the wrong place. With the following two simple files: |a.txt| |1 a 2 b 5 c | |b.txt| |2 x 4 y 5 z | The following command does not behave like expected: |$ join -a 1 -a 2 -e 0 a.txt b.txt 1 a 2 b x 4 y 5 c z | I would expect the option |-e 0| to fill up missing values with zeroes. However, the following does work: |$ join -a 1 -a 2 -e 0 -o auto a.txt b.txt 1 a 0 2 b x 4 0 y 5 c z | Reading documentation from |$ man join|, I see no connection between |-o| and |-e| that would make the above behaviour meaningful. Instead, I find it misleading that a useless |-o auto| needs to be inserted into my command for |-e 0| to work.. Is there an explanation, to be clarified in the manpage? Or is it a bug? (btw: $ join (GNU coreutils) 9.0 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel. ) -- Iago-lito --------------wfqIa12EFiwAXHsxpPe7QdbP Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Hello,

    This is a follow-up to this (yet) unanswered post on SE U&L: https://unix.stackexchange.com/q/696259/87656, which I'm cross-posting here. Don't hesitate to fire if it's the wrong place.

With the following two simple files:

a.txt

1 a
2 b
5 c

b.txt

2 x
4 y
5 z

The following command does not behave like expected:

$ join -a 1 -a 2 -e 0 a.txt b.txt 
1 a
2 b x
4 y
5 c z

I would expect the option -e 0 to fill up missing values with zeroes. However, the following does work:

$ join -a 1 -a 2 -e 0 -o auto a.txt b.txt 
1 a 0
2 b x
4 0 y
5 c z

Reading documentation from $ man join, I see no connection between -o and -e that would make the above behaviour meaningful. Instead, I find it misleading that a useless -o auto needs to be inserted into my command for -e 0 to work..

Is there an explanation, to be clarified in the manpage? Or is it a bug?

(btw:

$ join (GNU coreutils) 9.0
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel.

)



--
Iago-lito


--------------wfqIa12EFiwAXHsxpPe7QdbP-- ------------=_1648568282-28067-1--