Decryption via UNIX shell script

Tue Mar 15 19:17:37 CET 2005

you have to have a file with your passphrase in it then ( I made mine a
hidden file) you cat this file along with a | to the gpg command with -
- -passphrase-fd 0 "new file" "encrypted file"

Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams

             Albert Reiner                                                 
             <areiner at tph.tuwi                                             
   >                                                  To 
             Sent by:                  kraymer at                 
             gnupg-users-bounc                                          cc 
             es+dbsmith=ohiohe         gnupg-users at               
    at gnupg.or                                     Subject 
             g                         Re: Decryption via UNIX shell       
             03/15/2005 11:47                                              

[kraymer at, Mon, 14 Mar 2005 16:35:07 -0600 (CST)]:
> I am writing a shell script to automatically decrypt an encrypted file
> using GPG.  How do I send the passphrase to the executable (GPG).  I want
> no human intervention on this.  I'm calling the shell script from a batch
> file to decrypt the file.
> Anyone have a UNIX shell script (Korn Shell) that does this?

Read the man page; there is some --...-fd option you can use.


Gnupg-users mailing list
Gnupg-users at

More information about the Gnupg-users mailing list