On Thu, 14 Dec 1995, Richard D. Sheffar wrote:
This might not be exactly on topic here but how can I get pine or
procmail to tell me when I log in that I have mail in other folders,
other than my INBOX, I have set up 4 other folders for incoming mail and
would like to know if something is there with out having to start pine
and got to the folders either with L or TAB.???
only 4?!? last count I had 42 plus a series of entries to
dispose of obnoxious people if their name appears in the header or the
body! I call the bash script from .bash_profile, or I can call it
independently after I have done a major trashing in the folders.
the real slickness of this approach is to separate all messages
groups out by interest. some I read a couple times a day; others I mop
up once a month, etc. and the script lets me see what the relative
counts and group sizes are at login or whenever.
lst=".chk$$"
touch ${lst}
echo "processing messages....."
echo "" grep "^From .*199.$" $MAIL | less -C
echo ""
echo " msgs lines chars message group" >> ${lst}
cnt=`grep "^From .*199.$" $MAIL | wc -l`
echo -n " ${cnt}" >> ${lst}
wc -lc $MAIL >> ${lst}
for i in `ls inmail`
do
cnt=`grep "^From .*199.$" inmail/$i | wc -l`
echo -n " ${cnt}" >> ${lst}
wc -lc inmail/$i >> ${lst}
done
less -C $lst echo ""
rm ${lst}
unset cnt
unset lst
first group lists all messages in $MAIL showing the lines and "From "
(not "From: ") and pipes them through 'less -C' --if you want to
obtain more etail and control format a little better, use 'awk' and
have a little fun.
second group just lists the lines and character count plus msg count
for each of the folders. note that I use ~/inmail for the folders
created and stuffeded by 'procmail'
I'm sure I could be more elegant with perl --but this works well enough
if anyone does take the time to wring it out in perl, please remember
me with a copy!
attila
__________________________________________________________________________
go not unto usenet for advice, for the inhabitants thereof will say:
yes, and no, and maybe, and I don't know, and fuck-off.
_________________________________________________________________ attila__