gpg in a for loop

jag7720 jason at
Wed Aug 1 21:10:04 CEST 2007

I am writing a "simple" script that loops through a file and encrypts each
file listed then secure copies it to another server...  I am stuck

When I run my script I get 

gpg: shawnm: skipped: public key not found

here is the part of my script that does the encrytping and scp-ing

       for FILE in `cat $EEX`
        gpg -e -r shawnm  $FILE

if [ $? -ne 0 ] ; then
  echo "Could not encrypt $FILE"
  exit 1
        scp $FILE.gpg $USER@$DEST:$FILE.gpg

if I put this in its own script by itself and substitute the $FILE variable
with a file name it will run.

gpg -e -r shawnm  file.txt

Am I missing something? Can someone help?

View this message in context:
Sent from the GnuPG - User mailing list archive at

More information about the Gnupg-users mailing list