I am encrypting and ftping files with kshell from aix and I have a problem with the job not waiting long enough before it ftps the files. when I run the script it sends the files over and each time the file has a different length and cannot be decrypted but if I encrypt and the manually send the file they are fine... I think I need a way to wait longer than the "wait" command gives me
function encrypt_test
{
cd $mydir
gpg --recipient $user --recipient $user2 --encrypt-files $file
}
mydir=/home/encrypt/test
usercd="<<encryptkeyhis>>"
usercd2="<<encrtptkeymine>>"
file=stmt_ll*.*
encrypt_test
wait
# -----------------------------------------------------------------------------
# put the files on the ftp server
#
# -----------------------------------------------------------------------------
cd $mydir
[[ $USER = "<<user>>" ]];
echo "user <<username>> <<password>>
cd /usr/ardentsam/backfiles
prompt
mput *.gpg
quit" | ftp -n <<IPADDRESS>>
rm .gpg
mv stmt_ll*. $mydir/bkup