Stuart,

On Monday March 17, 2003 10:37, Douglas, Stuart wrote:
> Hello all,
>
> Take a look at the following script (alteration of the one Anthony Greene
> was kind enough to offer up to me).  My question: is there a way to use
> something like diff, cmp, comm or such to return a list of the differences
> (line by line) between 2 files?  The current script simply sends the
> current directory listing, 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
>
> Feel free to make any other suggestions (improvements) to what I've done
> here...it's kinda crude, but it does what I want (almost).

I'm not _exactly_ sure what you are trying to do, but here is a different 
approach you may wish to consider...

Scenario : Serveral "authors/publishers/whatever" uploading new/different 
material to a centralized source. This material then needs to be deseminated 
to multiple other individuals and kept syncronized. Should also have the 
ability to be queried for differences.

If this fits what you are trying to do, have you considered using CVS?

It has serveral advantages over what it looks like you are doing now.

1. It can be fully automated on all sides.
2. It keeps track of everything that happens.
3. It can be tunnelled through SSH for added security.
4. It works. (don't be fooled by the programming thing, it really does work 
well for binary files as well)

Just a thought.

-- 
Brian Ashe                                                     CTO
Dee-Web Software Services, LLC.                  [EMAIL PROTECTED]
http://www.dee-web.com/



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

Reply via email to