* Christian Ebert on Friday, December 25, 2009 at 11:45:34 +0000
> * Wu, Yue on Friday, December 25, 2009 at 13:50:41 +0800
>> Now I've changed to mbox from maildir, when with maildir, I use a sh script
>> to
>> count the number of mails in directory new/ of each of my mails/
>> sub-directory,
>> but now I don't know how to achieve it with mbox, any hint will be
>> appreciated.
>
> 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
oops, should be:
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
c
--
\black\trash movie _C O W B O Y_ _C A N O E_ _C O M A_
Ein deutscher Western/A German Western
--->> http://www.blacktrash.org/underdogma/ccc.php