Friday, 12 December 2014

Shell Scripts to check whether the entered character is Vowel or not

Write a Shell Scripts to check whether the entered character is Vowel or not

Solution:
echo "Enter a character"
read a
case $a in
a) echo "It is a vowel";;
e) echo "It is a vowel";;
i) echo "It is a vowel";;
o) echo "It is a vowel";;
u) echo "It is a vowel";;
*) echo "Not a vowel";;
esac   

Execution:

1 comment: