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

csplit doesn't support precision #5709

Closed
sylvestre opened this issue Dec 24, 2023 · 1 comment · Fixed by #5958
Closed

csplit doesn't support precision #5709

sylvestre opened this issue Dec 24, 2023 · 1 comment · Fixed by #5958
Labels

Comments

@sylvestre
Copy link
Contributor

With ours:

$ echo > in
$ csplit -b '%0#6.3x' in 1
csplit: incorrect conversion specification in suffix

With GNU:

$ echo > in
$ /usr/bin/csplit -b '%0#6.3x' in 1
0
1

The regexp here:
https://github.com/uutils/coreutils/blob/main/src/uu/csplit/src/split_name.rs#L52
and the following code needs to be updated

Tested in GNU with tests/csplit/csplit.sh

@tertsdiepraam
Copy link
Member

tertsdiepraam commented Feb 8, 2024

@marc-delgado-ferreres Glad you asked ChatGPT for us! Really helpful! Now please don't do that again.

Anyway, I think I just fixed the issue across these two PRs:

I'll verify that once those are merged and add some tests for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants