normal 0 false false false en-us x-none


W.A.S.S to print the following:

                              i.        Count of characters, words and lines from a file.

                            ii.        Count of five character words.

       iii.     Convert all lower case characters to upper case.

 

Program

 

#W.A.S.S. to Count of characters, words and lines from a file.

 

echo -e "Total character in the file are: \c"

cat good.sh |wc -c

echo -e "Total words in the file are: \c"

cntw=0

 

for w in `cat good.sh`

do

cntw=`expr $cntw + 1`

done

 

echo "$cntw"

echo -e "Total lines in the file are : \c"

cat good.sh |  wc –l

 

Output

 

Total character in the file are:     162

Total words in the file are: 27

Total lines in the file are :      15

Request for Solution File

Ask an Expert for Answer!!
Application Programming: normal 0 false false false en-us x-none
Reference No:- TGS0161550

Expected delivery within 24 Hours