|
Problem with GnuPG...need help
hello,
i am writing an automated script for GnuPG decryption for a file, which was already being encrypted,
homedir="/home/.gnupg"
PassPhrase=`cat /home/.gnupg/.passphrase`
echo $PassPhrase | gpg --homedir $homedir --passphrase-fd 0 --no-tty --output secret21.txt --decrypt-files secret2.txt
here bolded are the parameter passed.
but while executing the script it throws the following error
gpg: --output doesn't work for this command
if i modified the script i.e. hard code the pass phrase instead of getting it from the file, it works fine,
homedir="/home/.gnupg"
echo "mypassphrase" | gpg --homedir $homedir --passphrase-fd 0 --no-tty --output secret21.txt --decrypt secret2.txt
but this is not way , i want pass pharse should also get into script some hidden way.....
|