Password on command line?

Frank Hrebabetzky frankh@terra.com.br
Tue Aug 6 04:00:03 2002


Hi there,

I work occationally on some text files ciphered symmetrically, which
involves the following steps:
	gpg -decrypt <file> > <file>.txt	# get clear text
	pico <file>.txt				# edit it
	gpg -co <file> <file>.txt		# cipher symmetric.
	wipe <file>.txt				# erase clear text
So I wrote a script for that, but I have to type in 3 times the same
passphrase: for deciphering, ciphering and confirmation.

Passing the passphrase as command line parameter would solve the problem,
because the script could read it and pass it to gpg, but according to the
man pages such a gpg option doesn't exist. The option --passphrase-fd gave
me some hope first, because I thought I could write the passphrase in a
file first and wipe it out at the end, but my linux book only told me
about the standard file descriptors 0, 1 and 2, which don't help me.

Any suggestion?

-------------------------------------------------
Frank Hrebabetzky	Tel.:     +55 / 48 / 9998 7686
Florianopolis		email:	  frankh@terra.com.br
Brazil