Created
July 2, 2018 14:40
-
-
Save stpe/5d34425fbb8345cd11cb5feaecfc8ba7 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
cat links.txt | xargs -n 1 -I{} \ | |
curl -s -X POST \ | |
https://api-ssl.bitly.com/v4/bitlinks \ | |
-H 'Authorization: Bearer ad7ecf6cd10e8f072651f00cf90e2bc983a4a974' \ | |
-H 'Content-Type: application/json' \ | |
-d '{ "group_guid": "B99h99pjymR", "long_url": "{}" }' \ | |
2>&1 | jq -r '. | "\(.long_url)\t\(.link)"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment