Skip to content

Instantly share code, notes, and snippets.

@benr
Created January 19, 2023 08:25
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 benr/a39d147af33530e78c8a8ec79375e5a6 to your computer and use it in GitHub Desktop.
Save benr/a39d147af33530e78c8a8ec79375e5a6 to your computer and use it in GitHub Desktop.
Find GPG Key Expiration in Days (Bash)
EXPIRE=`curl -s https://releases.mondoo.com/rpm/pubkey.gpg | gpg --show-keys --with-colons | grep pub | awk -F: '{print $7'}`
NOW=`date +%s`
echo "Expires in $(( ($EXPIRE - $NOW) / 86400)) days"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment