On Tue, 2007-08-14 09:56:02 -0700, Michael Reynolds <[EMAIL PROTECTED]> wrote: > #!/bin/bash -x
Looking at the execution flow (requested by -x) you'd probably already be able to locate the problem. > in="/Volumes/Pictures/Photos" > out="[EMAIL PROTECTED]:/Volumes/Pictures/Photos/" > > echo "script called $0 $1 $2" > > cd "$in" > > for i in * > do > if [ $(lsof | grep -c "$i") = "0" ]; Hopefully "$i" doesn't parse as a regex... Also, grep is locale dependand... Maybe try it once without any interpretation (lsof | LC_ALL=C grep -x .... ). > then > echo -n "-- Parsing $i" > > if [ ! -s .pending_files ]; > then > echo "Pending:" > .pending_files > fi; > > if [ $(grep -c "$i" .pending_files) = "0" ]; Dito. > then > echo "$i" >> .pending_files > echo "sending $i" > rsync -vctzER -e ssh --timeout=600 --progress "$i" "$out" > if [ "$?" = "0" ]; > then > echo "$i" >> .sent_files > else > echo -n "-- File $i transfer failed" | logger > grep -v "$i" .pending_files > .pending_files_new Dito. > mv .pending_files_new .pending_files > fi; > fi; > else > echo -n "-- File $i is in use" | logger > fi; > done > exit 0 Bad. Here, you don't know if operation was all that successfull at all. MfG, JBG -- Jan-Benedict Glaw [EMAIL PROTECTED] +49-172-7608481 Signature of: Fortschritt bedeutet, einen Schritt so zu machen, the second : daß man den nächsten auch noch machen kann.
signature.asc
Description: Digital signature
-- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html