Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   Getting the copy results in a script (https://www.shirt-pocket.com/forums/showthread.php?t=402)

ScottEllsworth 05-25-2005 09:58 PM

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

dnanian 05-25-2005 10:50 PM

Your unelegant solution would be exactly what I would suggest, unless you want to do it in AppleScript. Given that you know what grep, cut and tail are, that seems unlikely... ;)


All times are GMT -4. The time now is 04:01 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.