Skip to content

Instantly share code, notes, and snippets.

@aphexmunky
Created January 11, 2018 10:21
Show Gist options
  • Select an option

  • Save aphexmunky/33b0dc0ae7c12bca3f1e12bf8447dccd to your computer and use it in GitHub Desktop.

Select an option

Save aphexmunky/33b0dc0ae7c12bca3f1e12bf8447dccd to your computer and use it in GitHub Desktop.

Revisions

  1. aphexmunky revised this gist Jan 11, 2018. No changes.
  2. aphexmunky created this gist Jan 11, 2018.
    5 changes: 5 additions & 0 deletions download-latest.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #!/bin/bash │2017-12-28 17:35:07 93049433 location-report-28-12-2017-17:00:22.csv
    │2017-12-29 00:35:07 92385322 location-report-29-12-2017-00:00:21.csv
    dir=`basename $PWD` │2017-12-29 10:34:04 88874615 location-report-29-12-2017-10:00:21.csv
    download=`aws s3 ls s3://$dir/ | sort | tail -n 1 | awk '{print $4}'` │2017-12-29 17:34:40 89295406 location-report-29-12-2017-17:00:21.csv
    aws s3 cp s3://$dir/$download . │2017-12-30 00:34:09 89133691 location-report-30-12-2017-00:00:21.csv