Shell script to count of five character words, Programming Languages

Assignment Help:

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


Related Discussions:- Shell script to count of five character words

Undetermined coefficients, We now require starting looking into finding a p...

We now require starting looking into finding a particular solution for n th order differential equations. The two ways which we'll be looking at are similar as those which we look

What is an abstract class, What is an abstract class:   Abstract class is s...

What is an abstract class:   Abstract class is stated as an abstract concept that cannot be instantiated or comparing to interface this can have some implementation and interface c

GUI(VB.NET), Can you please make my assignment in 3 days?I will pay you goo...

Can you please make my assignment in 3 days?I will pay you good

Computer education , #question.what. is cai? Explain its pitfalls .o

#question.what. is cai? Explain its pitfalls .o

assembly lang. H.W, 1- Allocate array with 32bit 100 element 2- Prompt the...

1- Allocate array with 32bit 100 element 2- Prompt the user to enter the maximum or the upper bound of the random value 3- Read the value and use it generate random numbers to init

Find out starting address of stack segment, For the following Code answer t...

For the following Code answer the following questions-: .STACK 100H .DATA COUNT DB 10 TOTAL DW 4126H .CODE MAIN PROC MOV BX, 3F20H MOV AL, BL MOV BL, COUNT MOV

What is jvm-java virtual machine, What is JVM-Java Virtual Machine  A J...

What is JVM-Java Virtual Machine  A JVM stands for java virtual machine. This is virtual computer or an abstract computer that runs the complied java programs. In fact JVM is

Formulas, how do I change a existing formula with a new formula and it show...

how do I change a existing formula with a new formula and it show the result

Python , Write a script that will list and count all of the images in a giv...

Write a script that will list and count all of the images in a given HTML web page. Each image starts with

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd