Created
January 19, 2023 08:25
-
-
Save benr/a39d147af33530e78c8a8ec79375e5a6 to your computer and use it in GitHub Desktop.
Find GPG Key Expiration in Days (Bash)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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