Code:
echo -n "Enter the Character : "
read c
case $c in
[ABCDEFGHIJKLMNOPQRSTUVWXYZZ]) echo "Alphabet";;
[a-z]) echo "Alphabet";;
[0-9]) echo "Digit";;
?) echo "special Character";;
*) echo "More than two Characters";;
esac
let i=2
echo -n "1!"
while test $i -le $x
do
echo -n " + $i !"
let i=$i+1
done
echo " = $sum"
Output:
[ty2011330@localhost ~]$ sh j12.sh
Enter the Character : A
Alphabet
[ty2011330@localhost ~]$ sh j12.sh
Enter the Character : f
Alphabet
[ty2011330@localhost ~]$ sh j12.sh
Enter the Character : 90
More than two Characters
No comments:
Post a Comment