From: James Edward Gray II Date: 2006-11-30T01:58:09+09:00 Subject: Re: Splitting a CSV file into 40,000 line chunks On Nov 29, 2006, at 10:53 AM, Nick Sieger wrote: > On 11/29/06, Drew Olson wrote: >> >> I've written a script to split a .csv file into smaller .csv files of >> 40,000 lines each. The intent here is to break the file down >> enough so >> that excel does not have issues reading each chunk. My code takes a >> filename from the command line and breaks it down as so: > > > Not ruby, but why not use "split -l 40000"? Because the sample code is also moving the headers to the new files. James Edward Gray II