3

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,760
  • 2
  • 21
  • 40

1 Answers1

8

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

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

Astrinus
  • 372
  • 7
  • 18