Last active
September 11, 2021 08:45
-
-
Save vedit/b39348514a05f122ffed4d76aad5d835 to your computer and use it in GitHub Desktop.
AWS Profile Selector
This file contains hidden or 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 | |
export AWS_PROFILE=$(zenity --list $(cat ~/.aws/config | grep profile | sed 's/profile //g' | sed 's/\[//g' | sed 's/\]//g' | sort) --column="" --text="Select a Profile" --title="AWS Profile Selection") | |
echo "${AWS_PROFILE}" | |
# Call the script with either "source awspr" or ". awspr" after placing the script in your path and making it executable | |
# Or add an alias by adding the following line to your .bashrc | |
# alias awsp=". awspr" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
first
brew install zenity