This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: IA 8 is not replacing the values for variables in script
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2009
06:22 AM
IA 8 is not replacing the values for variables in script
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
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
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 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:
this way insuring that $/$ gets replaced with /
sqlplus -s $DBUSER$$/$$DBPASSWD$
this way insuring that $/$ gets replaced with /
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2009
10:50 AM
Is this your whole script? I agree with pv7721 that all the cases look the same.