Help needed while encrypting the files within a shell script
Iyer, Hari
mailhiyer at yahoo.com
Thu May 20 00:27:20 CEST 2004
Hi,
I am very new to GNU and have been using Sun Solaris as the operating system. We use shell scripting for using with Oracle applications. Incidentally, I am able to encrypt these files when I run the commands from the command prompt. But, whenever I run these from the shell script, it just does not work. Find below, the sample shell script:
FILE_NAME=`echo $1|cut -d" " -f9|sed 's/"//g' `
OUT_PATH=`echo $1|cut -d" " -f10|sed 's/"//g' `
cd ${OUT_PATH}
if [ -r ${OUT_PATH}/${FILE_NAME} ]
then
gpg -r "Print Mail" --encrypt "./hari.txt"
echo ${?}
fi
STEPRC=${?}
if [ "${STEPRC}" != "0" ]
then
echo "*****************************************************"
echo " Error while encrypting the file"
echo " Please contact your system administrator "
echo "*****************************************************"
exit 0
fi
I have tried every possible unix permutations to invoke this but it just does not process.
The error message that it gives is:
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: can't open `/t027/oracle/.gnupg/pubring.gpg'
gpg: keydb_search failed: file open error
gpg: Print Mail: skipped: file open error
gpg: ./hari.txt: encryption failed: file open error
I urgently need some help in this regard. If anyone has some sample shell script wherein I can see these commands would be great.
Thanks.
Regards,
Hari.
Yahoo! India Matrimony: Find your partner online.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20040519/d18dbcf6/attachment.html
More information about the Gpa-dev
mailing list