If condition
Example:
echo "Please provide the user name and state name"
read name state_name
echo "User provided name is :$name and His state name is : $state_name "
if [ "$state_name" = "Andra" ]; then
echo "$name speaks Telugu"
else
echo "$name does not speak Telugu"
fi
Output:
Please Provide the user name and state name
Balakrishna andra
User provided name is :Balakrishna and His state name is : andra
Balakrishna speaks Telugu
No comments:
Post a Comment