commit 18356b4c9df5c7d04e68cae0c74125fd7820afc5 Author: Louis Date: Sat Dec 16 16:55:39 2023 +0100 feat: :sparkles: Add gpg-learn-serialno command diff --git a/Yubikey/gpg-learn-serialno.sh b/Yubikey/gpg-learn-serialno.sh new file mode 100755 index 0000000..d00291e --- /dev/null +++ b/Yubikey/gpg-learn-serialno.sh @@ -0,0 +1,15 @@ +# Print the command to be executed +echo "Executing command: gpg-connect-agent 'scd serialno' 'learn --force' /bye" + +# Check for user confirmation +read -p "Are you sure you want to execute this command? (y/n) " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]]; then + # Execute the command + gpg-connect-agent "scd serialno" "learn --force" /bye +else + # Do nothing + echo "Command not executed." +fi +