I need to split a file with 250k based on the size (preferable) or number of columns to several (~5) chunks. I am aware of split
command for row-wise splitting, but don't know if there is any similar function to split column-wise.
The number of columns in my file are not even, so the chunks cannot have equal number of columns.
Input:
AA BB CC DD EE FF GG HH II JJ KK LL MM
NN OO PP QQ RR SS TT UU VV WW XX YY ZZ
Desired output:
File1
AA BB CC DD
NN OO PP QQ
File2
EE FF GG HH
RR SS TT UU
File3
II JJ KK LL MM
VV WW XX YY ZZ