Splitting a text file by number of lines, not size

0

Using Total Commander you can split files by byte size, but that's obviously indiscriminate towards the content.

enter image description here

Is it possible to split files by number of lines instead?

Using Total Commander or some other tool.

Spikee

Posted 2018-03-09T09:22:25.123

Reputation: 459

Do any of the Powershell solutions here work for you: https://stackoverflow.com/questions/1001776/how-can-i-split-a-text-file-using-powershell What is the maximum file size?

– HelpingHand – 2018-03-09T13:08:37.933

Answers

0

Using busybox head and tail will help
https://frippery.org/busybox/

example sources, (you can cat or type or pipe your files):
busybox seq 1 100

first 50 lines:
busybox seq 1 100 | busybox head -50

last 50 lines:
busybox seq 1 100 | busybox tail -50

41st to 50th lines:
busybox seq 1 100 | busybox head -50 | busybox tail -10

kissson

Posted 2018-03-09T09:22:25.123

Reputation: 53