As per my scenario, Need to collect values from configuration files. But need to access values from the configuration files without specifying the keys.
By the source command I have done it to retrieve values by the following
Configuration.conf
export Name=value
export Age=value
export Address=value
Script.sh
source Configuration.conf
echo $Name
echo $Age
echo $Address
By the above way I could access the values from the configuration files.
I would like access the values without using the key of the configuration files.
In my above scenario, Key will be changing in any form (But values are going to be similar as well my logic). At the script I have to read the values without knowing the Key name. something like the following.
source Configuration.conf
while [ $1 ] // Here 1 is representing the first Key of the configuration file.
do
//My Logics
done
Any help is much appreciated.
while [ $1 ]would do the same regardless of what the parameter is. It isn't clear what you're trying to achieve.