I have one huge text file (over 100 gigs) with 6 columns of data (tab as separator). In first column I have integer value (2500 distinct values in set). I need to split this file into multiple smaller files depending on value in first column (note that rows are NOT sorted). Each of this smaller files will be used to prepare plot in matlab. 

I have only 8 GB of ram.

The problem is how to do that efficiently? Any ideas?