Created
April 26, 2015 14:34
-
-
Save raine/a53ab0fb3c7615f70154 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
data_url=https://gist.githubusercontent.com/jorin-vogel/7f19ce95a9a842956358/raw/e319340c2f6691f9cc8d8cc57ed532b5093e3619/data.json | |
file=`date "+%Y%m%d"`.csv | |
echo name,creditcard > $file | |
curl $data_url | jq -r 'map(select(.creditcard)) | .[] | [.name,.creditcard] | @csv' >> $file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment