I am trying to read values from variables like this
server=$(cat "$CONF_PATH" | grep "DevServer" | cut -d'=' -f2)
echo "server is : $server "
port=$(cat "$CONF_PATH" | grep "DevPort" | cut -d'=' -f2)
echo "port is : $port "
dbname=$(cat "$CONF_PATH" | grep "DevDatabase" | cut -d'=' -f2)
echo "dbname is : $dbname "
echo jdbc:sqlserver://$server:$port;database=$dbname;
The last echo statement is not working, I am expecting output like
jdbc:sqlserver://abc:1433;database=devdb;
where abc
is server name, 1433
is port and devdb
is dbname.
$CONF_PATH
in your question, and show us not only what you want but what the current output actually is. Don't make us guess – Chris Davies Mar 02 '22 at 23:13