Subject: bug#54625: Why do I need to specify `-o auto` for join's `-e` option to work?

From: Iago-lito <[email-masked]>
Date: Tue, 29 Mar 2022 10:07:08 +0200

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