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

Write a perl script to assign letter grades to the students, Tasks: Writ...

Tasks: Write a Perl script assignGrades.pl to assign letter grades to the students. Please use the classList2.txt file. Upon invoking, the script will access the file classL

Assembly language program, a program that enter an alphabet from the user a...

a program that enter an alphabet from the user and compare it is vowel or not?

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

Input output program, Problem Specification I/O programming is the \bre...

Problem Specification I/O programming is the \bread and butter", the raison d'etre, of microcontrollers. After all, our definition of a microcontroller is \a microprocessor wit

Amazon login, I want to set up automatic Amazon login

I want to set up automatic Amazon login

Django template, i''ve a problem with rendering a page with django template...

i''ve a problem with rendering a page with django templates

Operating systems, list of 10 operating systems with their hardware specifi...

list of 10 operating systems with their hardware specification and also list any 5 software associated with each operating system

Write a complete program using floating-point operations, Question 1: a...

Question 1: a) Assume that B is an array of 50 words; write a code which will place the smallest integer of array B in register AX. b) Write a small code (only three instr

Perl scripting, Am unable to write to file of type=file in perl script.It d...

Am unable to write to file of type=file in perl script.It does not have any extension.Help me..

Programme for create the class in the karel++ , Create the class Robot desc...

Create the class Robot described in the Karel++ book. Description: The Robot class described in the Karel++ text is a derived class of ur_Robot. Create class Robot as a d

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