procmail
[Top] [All Lists]

Re: archiving all but 100 newest messages to other folder

2001-04-17 06:31:54
* Ben Peter <Ben(_dot_)Peter(_at_)t-online(_dot_)de> [010417 02:00]:
Hi all,

can I use procmail/formail to keep only 100 messages in an mbox file and
move all others to another folder? 

Cheers,
Ben

Here's an idea.  Use at your own risk, though.  I haven't tested it.

:0i
| ls -t msg.* | sed '1,100d' | xargs -i mv '{}' another_folder

-- 
For he doth not now bring on his fury, neither doth he revenge
wickedness exceedingly.
   -- Book of Job, 35:15
--
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail