Skip to content
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

Merged
merged 8 commits into from
Oct 20, 2023

Conversation

zhitkoff
Copy link
Contributor

@zhitkoff zhitkoff commented Oct 17, 2023

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

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/split/filter is no longer failing!

1 similar comment
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/split/filter is no longer failing!

@zhitkoff
Copy link
Contributor Author

@sylvestre would you mind reviewing this one?

@@ -748,6 +748,9 @@ enum SettingsError {
/// Multiple different separator characters
MultipleSeparatorCharacters,

/// Using `--filter` with Kth chunk options that output to stdout
Copy link
Contributor

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 ? :)

Copy link
Contributor Author

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.

Copy link
Contributor

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 :)

Copy link
Contributor Author

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

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/split/filter is no longer failing!

@sylvestre
Copy link
Contributor

GNU testsuite comparison:

Congrats! The gnu test tests/split/filter is no longer failing!

bravo :)

@sylvestre sylvestre merged commit eede467 into uutils:main Oct 20, 2023
44 of 45 checks passed
@zhitkoff zhitkoff deleted the split-gnu-test-filter branch November 18, 2023 16:37
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