Skip to content

Instantly share code, notes, and snippets.

@stpe
Created July 2, 2018 15:09
Show Gist options
  • Save stpe/7fbb61bdc9edea0e2cf25d83b1b33f04 to your computer and use it in GitHub Desktop.
Save stpe/7fbb61bdc9edea0e2cf25d83b1b33f04 to your computer and use it in GitHub Desktop.
xargs -n 1 -I{} \
 sh -c " \
 curl -s -X GET \
 https://api-ssl.bitly.com/v4/bitlinks/bit.ly%2F2{}/clicks/summary \
 -H 'Authorization: Bearer ad7ecf6cd10e8f072651f00cf90e2bc983a4a974' \
 | jq .total_clicks" \
< shortlinks.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment