--batch option

Steve Butler sbutler@fchn.com
Tue Feb 19 00:12:02 2002

Try this script:

# COPYRIGHT (c) 1995-2001 Stephen M. Butler dba XRG
# COPYRIGHT (c) 1995-2001 First Choice Health Network
# This information may be copied, distributed and/or modified under
# certain conditions, but it comes WITHOUT ANY WARRANTY.
# See the Design Science License for more details
# =================================================================

homedir=$(default gpg_home)

  rm -f "$3" 2>&1 1> /dev/null
  default gpg_pass$1 \
  | gpg --batch --homedir $homedir --passphrase-fd 0 --no-tty --skip-verify
        --output "$3" --decrypt "$2"

$1 = pass phrase number to indicate which pass phrase to pass (I have two
public keys)
$2 = incoming file name (with .pgp extension)
$3 = file name to save it as

NOTE:  default is a utility (ksh script) to return information from a
configuration file.
  gpg_home -- the home directory for gpg
  gpg_pass1 -- the pass phrase for key #1
  gpg_pass2 -- the pass phrase for key #2

-----Original Message-----
From: karthikn@canada.com [mailto:karthikn@canada.com]
Sent: Monday, February 18, 2002 1:50 PM
To: gnupg-users@gnupg.org
Subject: --batch option


Looking to automate the decryption process using gnupg. Can't seem to find
any examples of the --batch option.
Any links\documentation would be of immense help.


Get your FREE personalized e-mail at http://www.canada.com

Gnupg-users mailing list

CONFIDENTIALITY NOTICE:  This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.