From a bash shell, how can I split a text file into chunks of exactly 3000 lines each? Of course, the last chunk can be smaller.
Is that possible, or should I use a more robust language to do that?
From a bash shell, how can I split a text file into chunks of exactly 3000 lines each? Of course, the last chunk can be smaller.
Is that possible, or should I use a more robust language to do that?
http://www.computerhope.com/unix/usplit.htm
split
, with option -l 3000
, will do what you want.