Preventing unwanted output

edkay at edkay at
Tue Aug 24 12:19:25 CEST 2004


I am using GPG to decrypt some data as part of an automated process. To do this,
I issue the following command:

cat DATA_FILE | /usr/bin/gpg --homedir ~/.gnupg --no-verbose --quiet --batch
--no-secmem-warning --passphrase-fd 3 3< FILE_WITH_PASSPHRASE --recipient
RECIPIENT --decrypt

On my dev server (running GPG 1.2.1), this works fine and the decrypted text is
output to stdout (and captured by a script).

On our production server (running GPG 1.0.6 - which I can't change) the same
command outputs the following two lines before the decrypted data:

gpg: encrypted with 1024-bit ELG-E key, ID 6860BBD6, created 2004-08-23

(obviously the capitalised words are replaced with sensible values).

These extra two lines are very frustrating since they add extra characters to
the decrypted data. Whilst I could get my script to ignore the first two lines,
this is not a very 'clean' solution and could cause unexpected problems later
if GPG was upgraded to a more recent version.

I searched the man pages for suitable options but haven't found any that
suppress these extra lines. Any suggestions would be most gratefully received.

Best regards,

PS: There is no ~/.gnupg/options file on either server.

Everyone should have

More information about the Gnupg-users mailing list