I want to read the file and assign the values to variables whic is in another file using shell script.
For example I have file as "myconf"
cli="/opt/Solartis_Monitoring/JON_CLI/bin/rhq-cli.sh" user="rhqadmin" passwd="janre" file1="/opt/Solartis_Monitoring/JON_CLI/samples/agentresourceid.js" file2="/opt/Solartis_Monitoring/JON_CLI/samples/agentresourceid" file3="/opt/Solartis_Monitoring/JON_CLI/samples/alertresourceid.js" file4="/opt/Solartis_Monitoring/JON_CLI/samples/alertresourceid" file5="/opt/Solartis_Monitoring/JON_CLI/samples/alertid"
and my script in another file as "testconf"
$cli -u $user -p $passwd -s $host -f $file3 > $file4
I want to get the values for the variables(cli,user etc) from "myconf" file.
Used while loop to read the values it has been assigning the entire line (
cli="/opt/Solartis_Monitoring/JON_CLI/bin/rhq-cli.sh") to $cli.
Need to assign only the values after the field separator(=) to my variable
I cant change "myconf" file it is predefined one. Please help on this