Skip to content

Instantly share code, notes, and snippets.

# set -e
# if set -e was actually set, the first time the -f command
# returns non-zero, the entire program would exit with the return code
# from the ssh command. DO NOT WANT
while true
do
retval=`ssh user@some.server.com "ls -1 $src_dir/nz_${DOMAIN}_done.flag 2>/dev/null|wc -l"`
if [[ $retval -eq 0 ]]
then
last_segment_per_sessionId = FOREACH gpv_sessionized GENERATE
FLATTEN(group) AS sessionId,
MAX(pv_sessionized.time) AS max_time;