# Print epoch seconds of successful AUV rsyncs, based on output of # syncAUV script. "Success" means that at least # one file was retrieved, and/or there were no rsync errors from 'syncer' BEGIN { successfulAUVSync = 0; } /Try to sync with beach/ { successfulAUVSync = 1; } /syncer starting/ { if (successfulAUVSync) { successfulAUVSync = 0; tzone = gsub("UTC", "GMT", $5); tzone = $5; // Extract date string and convert to epoch seconds date = $1 " " $2 " " $3 " " $4 " " tzone " " $6; ### print "date string: " date; cmd = sprintf("convertDate -format '%%a %%b %%d %%H:%%M:%%S %%Z %%Y' '%s'", date); cmd | getline et; close(cmd); print et " " date; } }