I'm using rsync in a script (on OSX) to copy from a raid to 2 backup drives, which happens when I run the script, probably 10x-20x in a day. I'm trying to figure out a way to parse the rsync log file, or anything for that matter, to tell me the number of files that were copied. Here is my rsync command:
rsync -auvh --delete --progress "$SourceTx" "$Dest1Tx" --log file="$SourceRoot/""CopyLog1.txt"
and my attempt (not working) to grep the log-file to derive the # of files copied:
cd "$SourceRoot/" howMany=$(cat CopyLog1.txt | grep -c .mov) osascript -e 'display notification "Transcode Copy Complete, '$howMany' files transfered, Log Files Created" with title "Transcode Copy Script"'