Following is the code . When I give input as Bangalore,its dospalying Welcome to Hitech City. But say , if I select Delhi or US, its not displaying the corresponding message. Its still says Welcome to Hitech City.
Seems that it not entering in the elif part. Please suggest.
#! bin/bash
echo "Enter the name of City from following :Bangalore,Delh,US"
read dist
if [ $dist=Bangalore]
then
echo " Welcome to Hitech City"
elif [ $dist=Delhi ]
then
echo " Welcome to National Capital "
elif [ $dist=US ]
then
tput blink
echo " Well you are trying for US !!! "
else
echo " Please try again from given option only !!!! "
fi
#! bin/bash
echo "Enter the name of City from following :Bangalore,Delh,US"
read dist
if [ $dist = Bangalore ]
then
echo " Welcome to Hitech City"
elif [ $dist = Delhi ]
then
echo " Welcome to National Capital "
elif [ $dist = US ]
then
tput blink
echo " Well you are trying for US !!! "
else
echo " Please try again from given option only !!!! "
fi