Skip to content

Bug: uu-nl rejects repeated -b* flags that GNU nl accepts #9132

@Nyovelt

Description

@Nyovelt

Summary

  • Tool under test: uu-nl (uutils coreutils) 0.3.0 @ 514291d
  • Reference: GNU nl 9.4
  • Impact: uu-nl exits with status 1 and prints an error when -b is provided multiple times (e.g. -ba -bt), while GNU nl treats the later flag as overriding the earlier one and succeeds.
  • Reproducer (no input files needed):
    printf 'one\ntwo\n' | /usr/local/bin/uu-nl -ba -bt
    (built inside fuzz-utils:latest, Ubuntu 24.04 base)

Expected Result (GNU nl)

$ printf 'one\ntwo\n' | /usr/bin/nl -ba -bt
     1  one
     2  two
$ echo $?
0

Actual Result (uu-nl)

$ printf 'one\ntwo\n' | /usr/local/bin/uu-nl -ba -bt
error: the argument '--body-numbering <STYLE>' cannot be used multiple times

$ echo $?
1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions