Bash Count Words inside loop?

Soldato
Joined
9 Dec 2006
Posts
9,287
Location
@ManCave
So i need to do some verification on script files

Problem: I need to count up the amount of ea.ch word in the whole text file including the processing the loops as well as doing (X.X) so they can be added up

What ive done so far
# counted each words inside the text file
# extracted the (x.x) & added them up.

#now need to count all the words between the loops * them by the loop amount

How do i do this??
for example do would be do * 5 (5.6) would be (5.6) appeared 5 times, source * 5


PHP:
#Simple one
[loop=5]
do
(5.6)
[loop=5]
[endloop]
source
[endloop]
 
Last edited:
Back
Top Bottom