Getting the copy results in a script
Hi, all.
I want to build a nightly backup script that mounts my firewire drive, does a sync, and then dismounts the drive. Finally, I want it to tell me how much work it did, or report any errors.
From other forum posts, I see how to do everything but report the status of the sync.
At the end of the log, one sees
|05:50:30 PM|Info| Scanned 972350 items occupying 67.44 GB (133183 directories, 832366 files, 6801 symlinks)
|05:50:30 PM|Info| Copied 972241 items totaling 67.37 GB (133162 directories, 832282 files, 6797 symlinks)
|05:50:30 PM|Info| Cloned 67.37 GB of data in 3854 seconds at an effective transfer rate of 17.90 MB/s
Anyone know a clever way to get that data into an email? My current plan is some ick involving grep, cut, and tail on the log file, but that is not elegant.
Scott
|