Created
April 15, 2023 08:41
-
-
Save tomkinsc/7619aa52b0ef4468a00dd11c07c74c28 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
#!/bin/bash | |
# First get auth token: https://api.firecloud.org/#/Profile/getProxyGroup | |
# Check to see if a pipe exists on stdin. | |
if [ -p /dev/stdin ]; then | |
while IFS= read emailaddress; do | |
printf "$emailaddress\t" | |
curl -X 'GET' \ | |
"https://api.firecloud.org/api/proxyGroup/$(echo $emailaddress | sed 's/@/%40/')" \ | |
-H 'accept: application/json' \ | |
-H 'Authorization: Bearer AUTH_TOKEN_HERE' | sed 's/"//g' | |
echo "" | |
done | |
else | |
echo "No input was piped to script" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment