For loop is not working with expect in pgp encyption script.
=========
-bash-4.1$ more TestScriptPGP.sh
for i in ls *.txt
do
spawn /opt/PGP/pgp -e +force $i "<abc@gmail.com>"
expect "Are you sure you want to use"
send "y\n"
expect "$"
done;
-bash-4.1$ ./TestScriptPGP.sh
./TestScriptPGP.sh: line 5: spawn: command not found
couldn't read file "Are you sure you want to use": no such file or directory
./TestScriptPGP.sh: line 7: send: command not found
couldn't read file "$": no such file or directory
./TestScriptPGP.sh: line 5: spawn: command not found
couldn't read file "Are you sure you want to use": no such file or directory
./TestScriptPGP.sh: line 7: send: command not found
couldn't read file "$": no such file or directory
./TestScriptPGP.sh: line 5: spawn: command not found
couldn't read file "Are you sure you want to use": no such file or directory
./TestScriptPGP.sh: line 7: send: command not found
couldn't read file "$": no such file or directory
./TestScriptPGP.sh: line 5: spawn: command not found
couldn't read file "Are you sure you want to use": no such file or directory
./TestScriptPGP.sh: line 7: send: command not found
couldn't read file "$": no such file or directory
-bash-4.1$
=================