Hello,
I have a problem. I want to launch a different sql queries for different shell parameter values, something like this.
#/bin/bash
case $1 in
"A")
sqlplus -s user/pass << SQL
query A;
SQL
"B") sqlplus -s user/pass << SQL2
query B;
SQL2
*) echo "something"
esac
The problem is that the first sqlplus connection does not finish (with SQL string) and the rest of the code is considered "A" case, esac included. So case statment is bad defined.
Anyone can help me? I was looking inside this forum and I didn�t find something similar
Thanks a lot!! and sorry about me english