Split a text file into multiple files, beyond the {99} limit of csplit
3
votes
1
answer
8509
views
I'd like to split the contents of a .txt file into multiple files, but I'm encountering two questions about limitations of csplit:
(1) can anyone offer a way around csplit's maximum limit of '99' file splits? I have a file with up to 384 splits based on a recurring blank line or character. I'd like csplit to be able to accomodate this with {*}, but this exceeds csplit's intrinsic file generation capacity.
(2) does anyone know of a way to pass the contents of a file to csplit (pipe to csplit), or can csplit only be used in its conventional way of calling a file in place? i.e.
csplit -f split_name file_to_split.txt /split/ {*}
vs. [series of commands] | csplit -f split_name /split/ {*}
Thank you for any suggestions, or alternatives to accomplish a similar task.
Asked by kehmsen
(59 rep)
Mar 25, 2016, 10:42 PM
Last activity: Feb 26, 2024, 07:10 PM
Last activity: Feb 26, 2024, 07:10 PM