-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
split
: --filter
and stdin updates
#5418
Conversation
GNU testsuite comparison:
|
1 similar comment
GNU testsuite comparison:
|
@sylvestre would you mind reviewing this one? |
src/uu/split/src/split.rs
Outdated
@@ -748,6 +748,9 @@ enum SettingsError { | |||
/// Multiple different separator characters | |||
MultipleSeparatorCharacters, | |||
|
|||
/// Using `--filter` with Kth chunk options that output to stdout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please explain what means Kth ? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, using any of the sub-variants of the --number option that prints Kth of N chunks to stdout, like:
K/N output Kth of N to stdout
l/K/N output Kth of N to stdout without splitting lines/records
r/K/N likewise but only output Kth of N to stdout
i.e. --number=2/5 or --number=l/1/10 or --number=r/9/22 , etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, i mean in the comment :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, pushed an update
GNU testsuite comparison:
|
bravo :) |
Refactor handling of
--filter
option, specifically BrokenPipe error handling - for "endless" and finite inputs.Better handling of stdin input errors for
--number
option.Following GNU
split
behavior for above.GNU test tests/split/filter.sh should stop failing