Skip to content

Instantly share code, notes, and snippets.

@calebcase
Created March 14, 2018 15:43
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 calebcase/1d524e396ea672a19fdb79b21c4c97f6 to your computer and use it in GitHub Desktop.
Save calebcase/1d524e396ea672a19fdb79b21c4c97f6 to your computer and use it in GitHub Desktop.
GPG Fingerprint
#!/bin/bash
set -euo pipefail
needle=${1?You must provide an name or email to search for.}
gpg2 --list-keys --fingerprint "$needle" |
grep 'Key fingerprint = ' |
sed -r 's/Key fingerprint = (.+)$/\1/' |
tr -d ' '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment