Last active
October 3, 2016 17:56
-
-
Save mikegrassotti/b0bc350dc2a3ec7c8a2c03cb384f970b to your computer and use it in GitHub Desktop.
OSX Shell hacks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Last 10 days | |
seq 0 10 | xargs -I {} date -v-{}d '+%Y-%m-%d' | |
# Download last 10 Papertrail archives | |
seq 0 10 | xargs -I {} date -v-{}d '+%Y-%m-%d' | xargs -I {} curl -g -v --progress-bar -f -o {}.tsv.gz -L -H "X-Papertrail-Token: $PAPERTRAIL_TOKEN" https://papertrailapp.com/api/v1/archives/{}/download | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment