Breaking News
You are here: Home / Program Code / UNIX / except a string from terminal and echo suitable message if it does not have at least 10 characters

except a string from terminal and echo suitable message if it does not have at least 10 characters

$vi message.sh 
echo -e "\n Enter string : \c"
read str

echo $str >> v.txt

x=`wc -c < v.txt`

if [ $x -lt 10 ]
then

        echo -e "\n String is too small............."

else
        echo -e "\n String is perfact with size."
Fi
:wq

Download Paper Solutions from Below Link

About admin

Scroll To Top