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

Feature request - "max split" functionality for xsv split #351

Open
mxr opened this issue Oct 17, 2024 · 0 comments
Open

Feature request - "max split" functionality for xsv split #351

mxr opened this issue Oct 17, 2024 · 0 comments

Comments

@mxr
Copy link

mxr commented Oct 17, 2024

Hello, thanks for this great tool. For my use case, I want to split a file into two chunks - a small chunk and a large chunk. The small chunk serves as "canary" to verify an operation. Once verified, I can repeat the operation with the large chunk.

I looked into doing this with xsv split, however it will split the file into $$n$$ chunks of size $$m$$, whereas I'm looking to split the file into two chunks (one of size $$m$$ and the other of size $$m \times (n-1)$$). Although I can re-join the $$n-1$$ chunks using xsv cat rows, this is a bit finicky.

Looking at other languages, Python's str.split has a maxsplit argument, Go has strings.SplitN, and Rust has str.splitn. Would you consider a similar argument to xsv split? 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

No branches or pull requests

1 participant