case
$ cat casescr
read -p "Enter your fruit" fruit
case $fruit in
banana) echo "$fruit is yellow";;
apple) echo "$fruit is green";;
esac
$ bash casescr
Enter your fruitbanana
banana is yellow
read -p "Enter your fruit" fruit
case $fruit in
banana) echo "$fruit is yellow";;
apple) echo "$fruit is green";;
esac
$ bash casescr
Enter your fruitbanana
banana is yellow
Comments
Post a Comment