Skip to content

Instantly share code, notes, and snippets.

@sevaine
Created July 26, 2013 05:03
Show Gist options
  • Save sevaine/6086399 to your computer and use it in GitHub Desktop.
Save sevaine/6086399 to your computer and use it in GitHub Desktop.
Get a GPG ID, based on an email address
## Local keyring
GPG_ID="$(gpg2 --list-keys --with-colons some.dude@that.domain.com | awk -F':' '/^pub/ { print $5 }')"
## Specified keyring
GPG_ID="$(gpg2 --no-default-keyring --keyring ./some/path/to/keyring.gpg --list-keys --with-colons some.dude@that.domain.com | awk -F':' '/^pub/ { print $5 }')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment