Use the Linux partition command:
split -l 20 file.txt new
Divide the file "file.txt" into files starting with the name "new", each of which contains 20 lines of text.
Type man split at the Unix prompt for more information. However, you first need to remove the header from file.txt (for example, using the tail command), and then add it back to each of the split files.
James King Dec 21 '13 at 16:37 2013-12-21 16:37
source share