On 17 May 2001, at 10:48, Charles Cazabon wrote:
> Dean Staff <[EMAIL PROTECTED]> wrote:
> > 
> > Thanks Charles,
> > 
> > Your suggestion worked.
> 
> You're welcome.
> 
> > newmail=`ls /home/"$USER"/Maildir/new/ | wc -l`
> > newmailbytes=`du -sb /home/"$USER"/Maildir/new/ | cut -f 1`
> 
> Hmmm.  I actually meant to refer to $HOME in my example, not $USER.
> But either works, providing all your homedirs are in fact under /home/
> .
Thanks again!

I tried $HOME as below and that also works. You did bring up a 
good point though. In my case all  user homedirs are in the same 
path, but I have admin accounts in another path that would not 
have worked with the previous script. Using $HOME eliminates the 
hard coded path.  

newmail=`ls $HOME/Maildir/new/ | wc -l`
newmailbytes=`du -sb $HOME/Maildir/new/ | cut -f 1`

Cheers
Dean

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dean Staff
Protus IP Solutions
210 - 2379 Holly Lane
Ottawa, ON K1V 7P2 Canada
613-733-0000 ex 546 Fax 613-248-4553
e-mail: [EMAIL PROTECTED] Web: http://www.protus.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to