Skip to content

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

Merged
cakebaker merged 1 commit intouutils:mainfrom
can1357:cut-honor-only-delimited-in-newline-delimiter-mode
Mar 20, 2026
Merged

cut: honor only-delimited in newline-delimiter mode#11394
cakebaker merged 1 commit intouutils:mainfrom
can1357:cut-honor-only-delimited-in-newline-delimiter-mode

Conversation

@can1357
Copy link
Contributor

@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.

@cakebaker cakebaker merged commit 483f13e into uutils:main Mar 20, 2026
159 of 160 checks passed
@cakebaker
Copy link
Contributor

Thanks!

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.

2 participants