I decided to split my perldl messages from incoming directory
however when I foolishly decided to run
http://markmail.org/message/tz6isa4n4ubyssuc#query:rerun procmail on a maildir+page:1+mid:tukr7f524zmykz7n+state:results
#/usr/bin/sh
cd Mail/inbox/cur
for file in *; do
procmail < $file
done
this gave me multiple copies of the original mails
then if I ran this multiple times I had a mess with 30,000 mails in my inbox
instead of 4301
so I had to run this
script-dealwithdups.pl
#!/usr/bin/perl -w
use strict;
use File::Find::Duplicates;
my $in=shift;
my @dupes = find_duplicate_files("$in");
my $length;
foreach my $dupeset (@dupes) {
my $length= scalar @{$dupeset->files} ;
if ($length >= 1) {
for (my $i=0; $i<$length -1 ;$i++) {
#print $ { $dupeset->files} [$i]; print "\n";
unlink $ { $dupeset->files} [$i];
}
}
where I got File::Find::Duplicates from CPAN
Subscribe to:
Post Comments (Atom)
1 comment:
彌月禮盒團購美食 印刷 彩色印刷 包裝 設計pe膜 冬令營 food processing equipment frying machine Telecom PCB 泡菜 團購美食油飯麻糬
創業加盟 水餃 壯陽食品 早洩漆彈情趣用品 湯包 搬家公司 會場設計紙盒訂裝 展覽設計展場設計 展覽設計 消防設備 消防設備 機電 崴立機電 牙齒美白 植牙
Post a Comment