Program
echo "enter the string"
read str
Len=`expr "$str" : '.*'`
if test $Len -lt 10
then
echo " $str has less than 10 characters"
else
echo " the input string is \"$str\" "
fi
read str
Len=`expr "$str" : '.*'`
if test $Len -lt 10
then
echo " $str has less than 10 characters"
else
echo " the input string is \"$str\" "
fi
OUTPUT
enter the string
welcome to the world of UNIX
the input string is "welcome to the world of UNIX"
welcome to the world of UNIX
the input string is "welcome to the world of UNIX"
enter the string
jhhj
jhhj has less than 10 characters
jhhj
jhhj has less than 10 characters
No comments:
Post a Comment