Skip to content

Commit 83938a9

Browse files
committed
allow awk dir to use variable expansion
1 parent b0e923e commit 83938a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

facebook/micro/monthly-archive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ perform_rollup_and_post ()
1414
BATCH="cd $1\nls -1 cvid_responses_${MONTH}*.gz"
1515
sftp -b <(echo -e "${BATCH}") -P 2222 fb-automation@ftp.delphi.cmu.edu 2>/dev/null | \
1616
grep "^cvid" | \
17-
awk -F_ 'BEGIN{print "cd $1"} {key=$3 $4 $5; if (key!=last && last!="") {print record} last=key; record=$0} 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}' | \
1818
sed '/^cvid/ s/^/get /' >fetch.sftp
1919
sftp -b fetch.sftp -P 2222 fb-automation@ftp.delphi.cmu.edu
2020
OUT=${MONTH/_/-}

0 commit comments

Comments
 (0)