I wish to split a large file (with ~ 17M Lines of Strings) into multiple files with varying number of lines in each chunk. Would it be possible to send in an array to the ‘split -l‘ command like this:
[
1=>1000000,
2=>1000537,
...
]
so as to send those many number of lines to each chunk
Use a compound command:
This also works with loops:
This does not work on OS X, where
headreads and discards additional output.