Hi,
I have prepared a config file in which I am declaring the value for a country such as: COUNTRY=USA
Now I am trying to read the country from the config file and print a message based on the same. I have written the following code in a script and when executing the script I getting an error.
Code:
cd /root/IMAGE_SAMPLE/
source ./country.conf
if [ "$COUNTRY" != "" ]
then
echo "Installtion in progress for $COUNTRY"
fi
Result:
[root@SNRBBY34844 IMAGE_SAMPLE]# chmod 777 ./Country_Sample.sh
[root@SNRBBY34844 IMAGE_SAMPLE]# ./Country_Sample.sh
: No such file or directory: cd: /root/IMAGE_SAMPLE/
: No such file or directory: ./country.conf
./Country_Sample.sh: line 8: syntax error: unexpected end of file
Can you please help?? Thanks in advance....