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
Assignment for Networing&camunication

The scenario As an XML expert you are required to model a system for an online furniture shop. After an interview with the shop manager you have the following information: T

You are to Use ASCII operations to design an IA-32 assembly language program which will do addition and subtraction on positive integers of any length represented in characters. T

I have a linux lab class that consist of 1 lab assignment per week for 5 weeks. It is an online virtual lab and is fairly easy, I just don''t have the time.

Let S =  {s 1 , s 2 , .... , s k } denote a set of k genomes. The problem of fingerprinting is the task of identifying a shortest possible substring α i from each string si such t

Explain, in your own words, how web designers can deal with CSS conflict resolution. What is the order of precedence between the different types of CSS (inline, embedded and extern

sir can you help me visual basic 6.0 project solution

(a) Define a procedure (subsets x) that takes a list as a single argument and returns all 2^n subsets of that list, i.e. the power set of the list; e.g. (subsets '(a b c)) ==> (

1.  Develop an HTML code to create a Web page of blue color & display links in red color. 2.  Develop an HTML code to create a Web page which contains an image at its center.

I am working on a game project using C# XNA. I only have two weeks from the deadline. Would you help me to finish it up? Please let me know as soon as possible. Thanks, Sophi