Is there a way send multiple sqlplus commands within a loop but waiting for one to run with success in order for the next one to start ? Here is a sample of my code. I have tried to add that sleep 15 because the functions that I'm going to execute are taking like 10-20s to run. I want to get rid of that 15s constant and make them run one after the other.
if [ "$#" -eq 1 ]; then
checkUser "$1"
while read line; do
sqlplus $user/$pass@$server $line
sleep 15
done < "$wrapperList"
fi