Skip to content

join: -o field list given as separate operands is rejected as extra operands #15279

Closed

Description

@ozenyunus35

GNU join accepts the fields of -o as separate arguments, as long as they directly follow -o:

$ printf '1 a\n2 b\n' > f1; printf '1 c\n2 d\n' > f2
$ join -o 1.1 1.2 2.2 f1 f2
1 a c
2 b d

uutils join treats 1.2 and 2.2 as file operands and fails with join: extra operand 'f1'.

This is what the o-sep-unquoted-spaces, o-sep-unquoted-tabs and o-sep-space-enoent cases of the GNU test tests/join/join.pl check (listed in #14705).

Activity

  1. emirmrkaljevic commented on Oct 15, 2026

    @emirmrkaljevic
    Contributor

    Confirmed on GNU coreutils 9.7 — join -o 1.1 1.2 2.2 f1 f2 works, while uutils 0.12.0 treats the extra format fields as file operands.

    I hit the same divergence while building a small recorded GNU join suite for behave (CLI behavior recording / rewrite diffing). Case is in examples/join (output: -o fields as separate operands). Against uutils 0.12.0 that suite is 23/26 overall, or 25/26 with --ignore-stderr; this -o parsing difference is the one that still fails on exit/stdout.

    Write-up of the broader GNU-vs-uutils pass (cut/paste/join/nl/…) if useful: https://dev.to/emirmrkaljevic/i-diffed-gnu-coreutils-against-its-rust-rewrite-with-auto-generated-tests-2ocl

  2. added 2 commits that reference this issue on Nov 6, 2026
    e5ae437
    6fba991
  3. added a commit that references this issue on Nov 7, 2026
    d85ed9b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions