gpg in a for loop

jag7720 jason at the-greenes.net
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`
do
        gpg -e -r shawnm  $FILE

if [ $? -ne 0 ] ; then
  echo "Could not encrypt $FILE"
  exit 1
fi
        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?

Jason
-- 
View this message in context: http://www.nabble.com/gpg-in-a-for-loop-tf4202075.html#a11951969
Sent from the GnuPG - User mailing list archive at Nabble.com.




More information about the Gnupg-users mailing list