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
Microsoft Intermediate Language in .NET When you create value in any terminology and gather, it will be changed to an 'Intermediate Language' (Microsoft Advanced Language - MSIL

program the following exercises using JAVA and JENA API: SPARQL endpoint to be queried: QUERY:">http://services.data.gov.uk/education/sparql QUERY: What are the school’s names th

Windows Communication Foundation The Microsoft windows Interaction or communication foundation (or WCF), formerly known as "Indigo", is an application selection program (API) in th

sir can you help me visual basic 6.0 project solution

A deterministic finite automaton (DFA) is an abstract machine that reads input from a serial (nonreversible) stream and changes between a finite number of  states according to the

1.) Write a flowchart and program to do the following: A pressure sensor in a cooling system measures the pressure of the refrigerant and is connected to Port -1 of the 8051. If th

THERE IS ANY1 COULD HELP ME WITH NETLOGO WORK

Question: (a) In JavaScript, the Window Object is commonly used to request information from a user or to output some results. Give three ways how to create instances of the

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

We want to create a structure that will represent a deck of cards (not necessarily full). Each card has a character (between '2' to '9' and 'T', 'J', 'Q', 'K', 'A') and a suit (dia