Skip to content

Instantly share code, notes, and snippets.

@kinow
Forked from Gabelbombe/gauth-capture-by-input.sh
Created February 27, 2017 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kinow/22b382bf50993fe11328b2cb2101e3d4 to your computer and use it in GitHub Desktop.
Save kinow/22b382bf50993fe11328b2cb2101e3d4 to your computer and use it in GitHub Desktop.
#!/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