#!/bin/ksh
echo "HELLO"
for x in 1 2 3 4 5
do
/oracle_home/bin/sqlplus username/password@MYDB<<EOF
SELECT COUNT(*) FROM EMPLOYEES;
EOF
exit
done
echo "GOODBYE"
i tested both scripts and they worked fine, I don't see a reason why this has something to do
with the loop, since it's absolutely the same, the loop just runs one time because of the exit, I don't see the sense of script nr2
the reason the script doesn't accomplish anything is because it's a stripped down version of the real script. i can't go posting sensitive information on here!
i've f'd around with this for hours. finally i created a new file, typed the same thing, executed it, and it worked!!!