Skip to content

Instantly share code, notes, and snippets.

@hamdyaea
Created December 16, 2020 14:02
Show Gist options
  • Save hamdyaea/f4292a559ac28cf023db1d31b04be400 to your computer and use it in GitHub Desktop.
Save hamdyaea/f4292a559ac28cf023db1d31b04be400 to your computer and use it in GitHub Desktop.
mystamp=$(date -r "/home/reporter/aws/traffic/$yesterday/$yesterday-trafficcensusaggregateids.tsv.gz" "+%Y%m%d%H%M")
echo $mystamp
}
#### send the file to the ftp ####
function send-file {
/usr/bin/ftp -inv $HOST <<EOF
user $USER $PASSWORD
cd $remote
lcd $localdir
mput $yesterday-trafficcensusaggregateids.tsv.gz
site "UTIME $mystamp $yesterday-trafficcensusaggregateids.tsv.gz"
bye
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment