GNU bug report logs -
#26029
Problems with join
Previous Next
Reported by: "Peter Kluge" <linux-projekt <at> techno.ms>
Date: Wed, 8 Mar 2017 17:43:01 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi,
> Am 08.03.2017 um 19:17 schrieb Reuti <reuti <at> staff.uni-marburg.de>:
>
> […]
> 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
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 6 years and 202 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.