Monday, 9 September 2013

Reading data from properties file in shell script

Reading data from properties file in shell script

I am writing a shell script which reads data from a properties file and
stores in into a local variable in shell script. The problem is when i am
trying to read multiple properties from the file and form a string its
getting over written #!/bin/bash
. /opt/oracle/scripts/user.properties
echo $username
echo $password
echo $service_name
conn="$username""$password""$service_name"
echo $conn
the values of username=xxxx password=yyyy and service_name=zzzz i expect
the output to be xxxxyyyyzzzz
but instead of that i am getting the output as zzzz
please tell me where am i doing the mistake ?

No comments:

Post a Comment