15 lines
333 B
Bash
Raw Permalink Normal View History

2018-12-15 21:25:04 -08:00
#!/usr/bin/bash
2018-08-27 13:30:54 -07:00
# Export a key to a given keyfile
echo -n "Enter the name of the output file: "
read -r keyfileoutput
echo -n "Enter the user ID or email: "
read -r userid
if [[ -z "${keyfileoutput}" || -z "${userid}" ]]; then
echo "Insufficient info."
else
gpg --output "${keyfileoutput}" --armor --export "${userid}"
fi