5

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?

Sam Washburn
  • 1,817
  • 3
  • 25
  • 43

1 Answers1

11

http://www.computerhope.com/unix/usplit.htm

split, with option -l 3000, will do what you want.

Astrinus
  • 412
  • 9
  • 19