Skip to content

cut: honor only-delimited in newline-delimiter mode#11394

Open
can1357 wants to merge 1 commit intouutils:mainfrom
can1357:cut-honor-only-delimited-in-newline-delimiter-mode
Open

cut: honor only-delimited in newline-delimiter mode#11394
can1357 wants to merge 1 commit intouutils:mainfrom
can1357:cut-honor-only-delimited-in-newline-delimiter-mode

Conversation

@can1357
Copy link

@can1357 can1357 commented Mar 18, 2026

uutils cut routes -z -d '' through a special newline-delimiter code path that ignores the -s only-delimited flag. GNU still suppresses undelimited records in this mode, but uutils emits the whole record plus NUL.

Reproduction Steps

printf 'abc' | cut -z -d '' -s -f 1 | od -An -tx1
# Expected (GNU): no output bytes
# Actual (uutils): 61 62 63 00

Impact

Pipelines that rely on cut -s to drop undelimited records process data that should be filtered out.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant