gpg and stdout
I've been using gpg lately and I've noticed that "gpg --decrypt" always defaults to stdout if no output file is specified. So, I always do "gpg --decrypt ./foo.gpg > ./foo", and pipe it around and stuff, which I like.
But, when I encrypt files, it always defaults to creating a file called "file.gpg". I want to be able to encrypt a file with "gpg --encrypt file" and have the output come out on stdout. is there any way to do that? |
the secret is to pipe the plaintext into gpg.
echo "Secret Message" | gpg --encrypt -r user@example.com to save your self from using a reset command after that, you might insert -a between gpg and --encrypt For the win: echo "Secret Message" | gpg -a --encrypt -r user@example.com |
All times are GMT -5. The time now is 06:25 PM. |