* Wu, Yue on Friday, December 25, 2009 at 21:12:52 +0800
> On Fri, Dec 25, 2009 at 11:56:44AM +0000, Christian Ebert wrote:
>> egrep '^From [-a-za-z0-9....@[-a-za-z0-9]+\.[a-za-z0-9]+ [A-Z][a-z]{2}
>> [A-Z][a-z]{2} [ 1-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [0-9]{4}$' mbox |
>> wc -l
>>
>> But you might be fine with:
>>
>> grep '^From ' mbox | wc -l
>
> Thanks, but that's the one part that I want to solve... I'm not familiar with
> sh
> script, the script I use for maildir is the follows:
>
> mailhier=~/.mutt/mails
>
> if [ $(find $mailhier -type f -print | wc -l) -ne 0 ]; then
> for d in "$mailhier/"*
> do
> if [ $(find "$d" -type f -print | wc -l) -eq 0 ]; then
> rm -r "$d"
> fi
> done
> fi
>
> I don't know how to do the same thing in sh script for mbox? Any one can
> figure
> me out of it?
Ah, you just want to remove empty mailboxes, then perhaps just
save_empty=no
is enough?
Otherwise something like:
# delete all empty file inside $mailhier
find $mailhier -type f -size 0 -exec rm -f {} \;
c
--
Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]
_F R E E_ _V I D E O S_ --->>> http://www.blacktrash.org/underdogma/