Pages

Tuesday, March 19, 2013

Write a script to check the given type of character?


$vi char_type.sh
echo “enter a character”
read char
case $char in
[a-z])echo “lower case”
;;
[A-Z])echo “upper case”
;;
[0-9])echo “Digit”
;;
?)echo “special character”
;;
*)echo “Entered more than one character”
;;
esac
:wq

No comments:

Post a Comment