Write a shell script to check the length of a string?



echo “enter a string”
read a
X r = ` echo $ a | wc –c `
Y r = 1 expr $ r – l


OUTPUT:

Enter string
republic
8

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