Hi Gurus,
I have written a script set_env.ksh to which I pass an argument and set the oracle login credentials based on the argument I pass.
The script has code as below.
ORACLE_SID=$1
DB_SCHEMA_LOGON=$DB_SCHEMA_USER/$DB_SCHEMA_PASSWORD@$ORACLE_SID; export DB_SCHEMA_LOGON;
echo $DB_SCHEMA_LOGON
It works well when I call it as below
$ set_env.ksh DEV
and also works when I call the script from within another script.
But when I run this script within the current shell as below,
. ./set_env.ksh DEV
it does not get the argument passed ($# returns 0).... Any idea why it behaves so ? How can I pass the arguments while executing the script from within current shell itself.
Any help appreciated.
Thanks,
Sabari Nath S