Write a Script to validate the name of person accepted through keyboard so that it doesn't exceed 10 character of length

echo “enter the name”
read a
count= expr length “$a";
echo $count
if [ $count -le 10 ]
then
echo $count
echo “valid”
else
echo “invalid”
fi

output:-
enter the name 
vikram
valid

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post