Create a gist now

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
## Alias GAuth to copy current to clipboard
function gauth() {
[ ! -z "${1}" ] && {
/Users/$(whoami)/go/bin/gauth |grep -i "aws ${1}" |sed 's/AWS //' |awk '{print$3}' |pbcopy
echo -e "Copied $(pbpaste) clipboard!"
} || {
/Users/$(whoami)/go/bin/gauth
}
}
alias mfa='gauth'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment