On 09/08/2011 04:21 PM, [email protected] wrote: > On Thu, 08 Sep 2011 15:02:32 -0400 Daniel Kahn Gillmor > <[email protected]> wrote: >> On 09/08/2011 02:54 PM, [email protected] wrote: >>> Is there an option in gnupg like the '-m' option in pgp which >>> allows the display of decrypted plaintext on the screen instead >> of >>> saving to file, > >> gpg --encrypt --armor -r $recipient >> >> (then type your message, and end with a ctrl-D after the last >> newline)
> can't get it to work, > > this is what happens (using cygwin on winxp): it looks like you didn't hit return after the recipient address? hitting return on just the command i wrote invokes gpg, which will be waiting for data on its standard input. Then, you type what you want to encrypt, hit return, and then ctrl-d to indicate end-of-file. gpg realizes its input is done, processes the material, and dumps the encrypted output to stdout. Alternately, you could feed your data directly on stdin from the command line with a pipe, like this: printf "just a test" | gpg --encrypt --armor -r $recipient If you're not down with these patterns, i recommend getting comfortable with stdin and stdout. The time spent will be repaid immensely if you plan to work with UNIX-like systems in the future. I recommend reading up on the basics of the concept: http://www.linfo.org/standard_input.html http://www.linfo.org/standard_output.html https://secure.wikimedia.org/wikipedia/en/wiki/Standard_streams and maybe also searching around on the 'net for some tutorials. Playing with pipes and redirection in your favorite shell is probably the best way to really internalize the concept, of course. hth, --dkg
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Gnupg-users mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnupg-users
