Hi,
I am touching shell scripting after a long gap of 3 years and forgotten almost all of it.
So need help from everyone to revamp myself.
To begin,please tell me what does this part of script do ( I have been asked to go thru a script and get a feel of it):
#get database connection string
connectStr="${DBUSER}/${DBPASS}"
connectStr="$connectStr@${DBNAME}"
Thanks in advance.
DBUSER="abc"
DBPASS="xyz"
DBNAME="myDB"
connectStr="${DBUSER}/${DBPASS}"
echo $connectStr
connectStr="$connectStr@${DBNAME}"
echo $connectStr
why dont you execute all the above lines one by one, and check the connectStr value
$ DBUSER="abc"
$ DBPASS="xyz"
$ DBNAME="myDB"
$ connectStr="${DBUSER}/${DBPASS}"
$ echo $connectStr
abc/xyz
$ connectStr="$connectStr@${DBNAME}"
$ echo $connectStr
abc/xyz@myDB