title: How to split a file into equal parts, without breaking individual lines?
body: <p>I was wondering if it was possible to split a file into equal parts (<em>edit:</em> = all equal except for the last), without breaking the line? Using the split command in Unix, lines may be broken in half. Is there a way to, say, split up a file in 5 equal parts, but have it still only consist of whole lines (it's no problem if one of the files is a little larger or smaller)? I know I could just calculate the number of lines, but I have to do this for a lot of files in a bash script. Many thanks!</p>