Created
August 31, 2020 13:16
-
-
Save topahl/b8607281b6ef171dac51e82c3bb14205 to your computer and use it in GitHub Desktop.
This scipt lists all cf org id's with the corresponding org names.
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 | |
# list all org guids | |
# list of all Org names we need to iterate through | |
orgs=$(cf orgs | tail -n +4) | |
function get_guid() { | |
org=$1 | |
echo "$org:" | |
# get org GUID | |
cf org "$org" --guid | |
echo "" | |
} | |
for org in $orgs | |
do | |
get_guid $org | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment