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.)îÅ;¢¸À^rjw±¥êírÈ5Eè®;¬¶ÈZ®§Ê«²H¥Ä{©~ÈËç{±Nëh®&¥°·®w¯z¼)à~º&¶jÈl ée¶2±§fp¥É'£m¶ÿiÛ(±ÙÜoÚv'uÛZÝ÷ïZ)rX*Z«,jË"Öf¢)à+-J¦j˲ȵ©d+-²Ê.Ç¢¸ëa¶Úlÿùb²Û,¢êÜyú+éÞùb²Û?+-wèþÊZ«,jË"Ö