[Tutor] Parsing large files
Rick Pasotto
rick at niof.net
Fri Feb 6 13:46:19 EST 2004
On Fri, Feb 06, 2004 at 12:33:10PM -0500, Andrew Eidson wrote:
> I have a text file that is tab delimited.. it has 321 columns with
> over 1000 rows.. I need to parse this out to 2 text files with roughly
> half the columns and the same number of rows. Just looking on some
> guidance on the best way of doing this (been working on a GUI so much
> lately my brain is toast)
Why does it matter how many columns there are? Are you rearranging them
or using a subset? If not just write the first 500 lines to one file and
then the rest to another. The unix 'split' command will do this.
Don't make things more complicated than necessary.
--
"All progress is based upon the universal innate desire
on the part of every organism to live beyond its income."
-- Samuel Butler *KH*
Rick Pasotto rick at niof.net http://www.niof.net
More information about the Tutor
mailing list