On Mon, Mar 17, 2003 at 10:37:08AM -0500, Douglas, Stuart wrote:
> Hello all,
> 
Hi Doug,  I have a script for you below: 
Please don't send HTML mail to the email list. 
Here is how to fix exchange so it conforms to the RFC's on lists and USENET:
http://expita.com/nomime.html#exchange
Basically you just :
   1. On the Tools menu, click Options, and then click the Mail Format tab.
   2. In the Send in this message format list, select Plain Text or HTML, and
      then click OK.
Also - please wrap your text at about 73 chars wide

> my preference would be to send the only the differences between the current and 
> previous copies.
> 
> # Compare the previous and current directory listings.
> if cmp -s /etc/ftpradiolsnew /etc/ftpradiolsold
> then
>    # The FTP radio directory listing has not changed, update listing only.
>    rm -rf /etc/ftpold
>    cp /etc/ftpnew /etc/ftpold
> else
>    # The directory listing has changed, send an e-mail notification & update listing.
>    cat /etc/ftpnew | mail -s "updated FTP radio spot list" [EMAIL PROTECTED]
>    rm -rf /etc/ftpold
>    cp /etc/ftpnew /etc/ftpold
> fi

Put something roughly like this inside the else block of your script above.
(No I'm not doing all of it for you - you need to do some of it yourself.)
:-)

cd /etc/ftpradiolsnew
for file in *; do  
   if cmp -s $file /etc/ftpradiolsold/${file} ; then
      echo "File $file has changed" >> /tmp/ftpdiff$$
      diff $file /etc/ftpradiolsold/${file} >> /tmp/ftpdiff$$
      echo "\n\n############################################\n\n >> /tmp/ftpdiff$$
   fi
done
cat /etc/ftpnew /tmp/ftpdiff$$ | mail -s "updated FTP radio spot list" [EMAIL 
PROTECTED]

      
-- 
Jeff Kinz, Open-PC, Emergent Research,  Hudson, MA.  [EMAIL PROTECTED]
copyright 2003.  Use is restricted. Any use is an 
acceptance of the offer at http://www.kinz.org/policy.html.



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to