bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26029: Problems with join


From: Reuti
Subject: bug#26029: Problems with join
Date: Thu, 9 Mar 2017 11:57:07 +0100

Hi,

> Am 08.03.2017 um 19:17 schrieb Reuti <address@hidden>:
> 
> […]
> The strange thing seems to be, that "-j1 2" is handled like "-1 2". "-j 1" 
> should already have an option and "2" would then become the first filename 
> making the last filename in the command line superfluous.

My investigations revealed: on a Mac the man page of `join` explains the 
behavior. The options -j, -j1 and -j2 are listed with the BSD version of `join` 
as being there for compatibility. This leads to the assumption, that nowadays 
-1 and -2 should better be used.

The coreutils version of `join` doesn't explain -j1 or -j2 anywhere AFAICS (but 
the `join` application covers them as special cases in the source). Neither on 
the man page, nor the info page it's mentioned. At least this should be noted 
somewhere. Personally I find it confusing, that "-j 3" is like "-j3", but "-j1" 
and -"j2" are special and need an argument. The info page even lists "-j3" in 
the examples (no intervening blank). It would be good if there would be a hint 
of this trap on the man page, as the plain statment:

       -j FIELD
              equivalent to '-1 FIELD -2 FIELD'

does not work in all cases essentially. (One could argue, that no one will use 
"-j1" standing alone and expecting it to work as "-j 1" as it's the default 
anyway, but at least "-j2" might give some surprise.)

-- Reuti

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


reply via email to

[Prev in Thread] Current Thread [Next in Thread]