Skip to content

split: -C with large argument splits at the wrong place #7026

Description

@jfinkels

Environment: Ubuntu 20.04, uutils main branch (git commit dddbc17), gnu coreutils version 9.5.218-7e5b6

Steps to reproduce:

# One very long line, one very short line, one very long line.
printf '%131070s\n' '' > expaa
printf 'x\n' > expab
printf '%131071s\n' '' > expac
cat expaa expab expac > bigin
split -C 131072 bigin

What happens now: uutils splits at the wrong place:

$ wc -c xa?
131071 xaa
131072 xab
     2 xac
262145 total

What I expected to happen: GNU split splits as expected (after each newline):

$ wc -c xa?
131071 xaa
     2 xab
131072 xac
262145 total

Notes: this is causing a failure in the GNU test file tests/split/line-bytes.sh.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions