# Determine when HS and AUV are within RF range, as indicated by successful # file "pull" from AUV in syncAUV log. BEGIN { auvName = ARGV[1]; ARGV[1] = ""; pullTag = "pull files from " auvName; } match($0, pullTag) { pullingFromAUV = 1; } /pull.* complete - status/ { if (pullingFromAUV) { tzone = gsub("UTC", "GMT", $5); tzone = $5; date = $1 " " $2 " " $3 " " $4 " " tzone " " $6; cmd = sprintf("convertDate -format '%%a %%b %%d %%H:%%M:%%S %%Z %%Y' '%s'", date); cmd | getline pullTime; close(cmd); } } /got.*xfers/ { if ($2 > 0 && pullingFromAUV) { # Actually pulled at least one file from AUV print pullTime " " date; } } /Try to sync with beach/ { # Done with AUV sync pullingFromAUV = 0; }