Chopping a very large file into smaller files

From: George Gallen (ggallen@slackinc.com)
Date: Mon Apr 22 2002 - 14:05:56 EDT


We recently did a large emailing, and alot of the emails were refused
(mostly because of being old email addresses).

I have custom software that goes through the /usr/spool/mail/username
incoming mail file, and strips out the email addresses, so we can update
our files.....HOWEVER, this time the file is VERY large (apx 150meg)
which our program can not handle in memory.

Is there any way to cut the file into pieces, but only break on certain
instances (like From ) so It won't split any emails?

If no easy methods, then I'll write something in PERL that will do what
I need.

Figured before I go and re-invent...

We are currently on 3.2c (I know...it's old) but I don't think that really
matters
here, it's more of general unix utility question.

Thanks
George

George Gallen
Senior Programmer/Analyst
Accounting/Data Division
ggallen@slackinc.com
ph:856.848.1000 Ext 220

SLACK Incorporated - An innovative information, education and management
company
http://www.slackinc.com



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:48:38 EDT