 <p>You must have a lot of lines. Are you sure that the second row repeats enough to put those records into an individual file? Anyway, awk is holding the files open until the end. You'll need a process that can close the file handles when not in use. </p> <p>Perl to the rescue. Again.</p> <pre><code>#!perl while( &lt;&gt; ) { @content = split /,/, $_; open ( OUT, "&gt;&gt; $content[1]") or die "whoops: $!"; print OUT $_; close OUT; } </code></pre> <p>usage: <code>script.pl your_monster_file.csv</code></p> <p>outputs the entire line into a file named the same as the value of the second CSV column in the current directory, assuming no quoted fields etc.</p>