in reply to Re^2: split a file into number of file based on line count
in thread split a file into number of file based on line count

Why do all that when you can equally well use
split -n 100 some_file
??

See man split... (on some *NIXes, -l is used instead of -n to specify the line count)

Update:

Qualified the usage of the line count option

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^4: split a file into number of file based on line count
by ww (Archbishop) on May 13, 2009 at 12:01 UTC
    Not general. See OP's ref to counting lines.
      Good point, well made ww :-D

      It's a classic case of me seeing what I wanted to - I saw ...split that file into 5 file each should contain 100 lines... and tho' I saw the subsequent narrative (fully defining the problem), I completely ignored it !!

      Glad it wasn't an exam :-D

      A user level that continues to overstate my experience :-))