On Fri, 2004-01-09 11:38:20 +0100, Andreas Moroder <[EMAIL PROTECTED]>
wrote in message <[EMAIL PROTECTED]>:
> I would like to replicate one file from one machine to a second one with 
>  rsync. After the file is copied ( rsync in read mode ), if the file 
> has changed i must start a small batch, if it has not change I must do 
> nothing.

Ask for very verbose output. Then, you'll either get the filename, or
you'll get "filename is uptodate". So, if you can't find " is uptodate"
in rsync's output, start your script:

$ rsync --many-options-here 2>&1 | grep ' is uptodate$' > /dev/null 2>&1 || 
./your_script.sh

Of yourse, fi
MfG, JBG

-- 
   Jan-Benedict Glaw       [EMAIL PROTECTED]    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

Attachment: signature.asc
Description: Digital signature

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to