File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 99echo ${MONTH}
1010R_MONTH=${MONTH#* _} ; R_MONTH=${R_MONTH# 0}
1111
12- # Save script's arguments to reference by name in perform_rollup_and_post() so the script's
13- # positional arguments and perform_rollup_and_post's positional arguments don't get confusing.
14- arg0=$0
15- arg3=$3
16- arg4=$4
17- arg5=$5
18-
1912perform_rollup_and_post ()
2013{
2114 BATCH=" cd $1 \nls -1 cvid_responses_${MONTH} *.gz"
2215 sftp -b <( echo -e " ${BATCH} " ) -P 2222 fb-automation@ftp.delphi.cmu.edu 2> /dev/null | \
2316 grep " ^cvid" | \
24- awk -F_ ' BEGIN{print "cd $1"} {key=$arg3 $arg4 $arg5 ; if (key!=last && last!="") {print record} last=key; record=$arg0 } END{print record}' | \
17+ awk -F_ ' BEGIN{print "cd $1"} {key=$3 $4 $5 ; if (key!=last && last!="") {print record} last=key; record=$0 } END{print record}' | \
2518 sed ' /^cvid/ s/^/get /' > fetch.sftp
2619 sftp -b fetch.sftp -P 2222 fb-automation@ftp.delphi.cmu.edu
2720 OUT=${MONTH/ _/ -}
You can’t perform that action at this time.
0 commit comments