Write a shell script to check if the character entered by the user is in upper case, lower case, a digit or a special symbol?



echo “ Enter anything”
read n
case $n in
[ A – Z ] ) echo “ you have entered a character in uppercase”;;
[ a – z ]) excho “ you have entered a character in lowercase”;;
[ 0 – 9 ]) echo “ you have entered a digit”;;
* / echo “ Too many characters have been entered”

OUTPUT:

Enter anything                                                              
Hello
Too many characters have been entered

Comments

Popular posts from this blog

Write a program to add two number using inline function in C++?

Traversing of elements program with algorithm and Flowchart