PDA

View Full Version : IA 8 is not replacing the values for variables in script



Sakthivel
06-05-2009, 06:22 AM
Hi,

I am writing a script in IA 8->Install->Execute Script.

I set few variables in Pre-Install.I use that variable in the script many times.

case $VARIA$ in

1)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
2)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
3)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
4)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
esac

When I run the IA, it substitues values for $DBUSER$ and $DBPASSWD$ in case 1) and 3).It is not substituting values for alternate cases 2) and 4).

Could you help to resolve this?

Regards,
Sakthivel

pv7721
06-05-2009, 07:22 AM
Honestly I don't see any differences between all 4 cases, but if I were you I would write them like this:


sqlplus -s $DBUSER$$/$$DBPASSWD$

this way insuring that $/$ gets replaced with /

Sakthivel
06-05-2009, 09:00 AM
Hi,
Each case has to do different things.
For example if $DBUSER$ value db1 and $DBPASSWD$ value dbause means

Assume $VARIA$ as 2
I get the following output

case 2 in

1)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
2)
sqlplus -s db1/dbause
;;
3)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
4)
sqlplus -s db1/dbause
;;
esac

it substitutes for alternate cases.

Regards,
Sakthivel

purcellk24
06-05-2009, 10:50 AM
Is this your whole script? I agree with pv7721 that all the cases look the same.