Thanks, 
 
I learn something new every day.  
 
Gary 

        -----Original Message----- 
        From: Peter Kiem [mailto:[EMAIL PROTECTED] 
        Sent: Thu 12/4/2003 5:02 PM 
        To: Gary Smith 
        Cc: [EMAIL PROTECTED] 
        Subject: RE: [SAtalk] bigevil.cf + rsync?
        
        

        Hi Gary,
        
        > I'm actually a windows guy who has been converting to linux for some time
        > so my scripting is rusty and primitive (cause that's what I know) but it
        > works.
        
        I have similar scripts but with rsync.  Forgot all about wget :)  D'oh!
        
        Hope you don't mind some scripting tips?
        
        > if [ -f bigevil.cf ]
        > then
        >         rm -f bigevil.cf
        > fi
        
        Can be shortened to
        [ -f bigevil.cf ] && rm -f bigevil.cf
        
        > if [ -f /tmp/bigevil.cf ]
        > then
        >         rm -f bigevil.cf
        > fi
        
        Same.
        [ -f /tmp/bigevil.cf ] && rm -f bigevil.cf
        
        >         cmp /tmp/bigevil.cf /etc/mail/spamassassin/bigevil.cf >/dev/null
        > 2>&1
        
        cmp -s will not produce any output so you don't need the /dev/null redirect
        
        if fact you can do
        cmp -s /tmp/bigevil.cf /etc/mail/spamassassin/bigevil.cf || {
          # do the mv's and emails here
        }
        
        --
        Regards,
        +-----------------------------+---------------------------------+
        | Peter Kiem            .^.   | E-Mail    : <[EMAIL PROTECTED]> |
        | Zordah IT             /V\   | Mobile    : +61 0414 724 766    |
        |   IT Consultancy &  /(   )\ | WWW       : www.zordah.net      |
        |   Internet Services  ^^-^^  | ICQ       : "Zordah" 866661     |
        +-----------------------------+---------------------------------+
               My current spamtrap address is [EMAIL PROTECTED]
        

áŠÄë^™¨¥ŠË)¢{(­ç[ÈL.)îÅ;­¢¸š–À^r‰žjw±¥êíŠrÈ5Eè®;¬¶ÈZ®—§Ê«²H¥–Ä‚{©~ŠÈË­ç{±Nëh®&¥°·š®w¯z¼­†)à~º&¶›jÈl…ée¶‹2±§fŠp¥‰É'£m¶ŸÿiÛ(±ÙÜoÚv'uÛ–Z‰Ý÷ïZ)rXœ‘*Z™«,jË"žÖ’f¢–)à–+-J–¦j˲ȵ©d–+-²Ê.­Ç¢¸ëa¶Úlÿùb²Û,¢êÜyú+éÞùb²Û?–+-ŠwèþÊZ™«,jË"žÖ

Reply via email to