Shell script to count of five character words, Programming Languages

Shell Script  to Count of five character words

 

Program

 

  W.A.S.S. to count of five character words.

#07MCG20

 

cnt=0

for w in `cat good.sh`

do

len=`echo $w | wc -c`

len=`expr $len - 1`

if test $len -eq 5

then

cnt=`expr $cnt + 1`

fi

done

echo "Total words of length file are : $cnt"

 

Output

 

Total words of length file are : 3

Posted Date: 9/26/2012 8:07:25 AM | Location : United States







Related Discussions:- Shell script to count of five character words, Assignment Help, Ask Question on Shell script to count of five character words, Get Answer, Expert's Help, Shell script to count of five character words Discussions

Write discussion on Shell script to count of five character words
Your posts are moderated
Related Questions
How to create an ER diagram?

Architecture and Components The .NET Framework 3.5 The .NET Structure (pronounced dot net) is an application framework that works generally on Enthusiasm Microsoft windows. It has

Example- Arithmetic :  Given the subsequent two matrices, So calculate A-5B. Solution There isn't much to do now other than the work. We first multiplied

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

THERE IS ANY1 COULD HELP ME WITH NETLOGO WORK

C++ language introduces object-oriented programming (OOP) features to C language. It offers classes, which provide the four features commonly present in OOP (or some non-OOP) langu

Access Modifiers Convenience Modifiers or we can say (Access Specifies) identifies as the opportunity of accessibility of an Item and its associates. All C# kinds and kind associat

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Attributes to Elements Create an XSLT stylesheet that converts all attributes found in a given XML document to elements.Use the sample instance from question 2 to test the tra

I need help programming an arduino uno to scan an ean-8 student barcode and display their name and id on computer. This is a capstone project.