Count number of Charecter(s) present in a Line > Unix Shell Programming - counter
Sponsored Links


Popular Links


List of Abbreviations

National Highways in India

States & Union Territories of India

Currency of All Countries

Count number of Charecter(s) present in a Line > Unix Shell Programming

You are Here: Home > Computer Subjects > Unix Shell Programming…

 

Count number of Charecter(s) present in a Line

Code:

clear

echo -n "Enter a Line==> "
read str

c=`echo $str | wc -c`
c=`expr $c - 1`

echo $c "Charecter(s) presents in this line..."

Optput:

Enter a Line==> Unix Programming
16 Charecter(s) presents in this line…

 

Click Here to Find Latest Jobs and Current Affairs

 

Updated: June 1, 2013 — 4:33 am
© 2016. All Rights Reserved. WikiIND.com