09-14-2010
Count words
Hi, does anyone know the command to count words by its length.
I need to Count the number of five letter words that I have in a file with thousand of words.
thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
i have a string like
str=abc def ghi jkl
now i want to count the no of words in the string
please help (7 Replies)
Discussion started by: satish@123
7 Replies
2. Shell Programming and Scripting
hi
i have a line
"abc,def,ghi,abc,def ,ghi,abc,def,ghi,abc,def ,ghi,abc,def,ghi,abc"
I want to print the no of words, words separated by comma
please help (3 Replies)
Discussion started by: Satyak
3 Replies
3. Shell Programming and Scripting
Please help in the following problem:
Input is:
Pritam
123
456
Patil
myname
youname
Pritam
myproject
thisproject
iclic
Patil
remaining text
some more text
I need the command which will display the no of lines between two words in the whole file.
e.g. Display all the no of lines... (5 Replies)
Discussion started by: zsudarshan
5 Replies
4. Shell Programming and Scripting
Hello,
I will count words in a file (or more files) and count (if given up) empty files (test -z?), how can I do this? Like this:
There are "108" words in "3" files
There are "2" empty files
Thanks for your reaction.
Regards,
Arjan Engbers
(My English is not good, I hope you... (4 Replies)
Discussion started by: arjanengbers
4 Replies
5. Shell Programming and Scripting
hello,
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies
6. Shell Programming and Scripting
Hi All!
can anyone help me with this code?
I want to count words or letters in every line with
if(count>20){else echo $myline}
awk '/<script /{p=1} /<\/script>/{p=0; next}!p' index.html | while read myline; do
echo $myline
done
Thank you !!! (3 Replies)
Discussion started by: sanantonio7777
3 Replies
7. Shell Programming and Scripting
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Discussion started by: jmarx
1 Replies
8. Shell Programming and Scripting
hi all
how to count words from a text
aaa bbb ccc ddd
123 aaa 123 aaa
aaa ddd 123
i need to cout hoe many time the words "aaa" and "123" each appears
the output should be
4 3
or
4
3
or
aaa 4
123 3
thanks (10 Replies)
Discussion started by: sharong
10 Replies
9. Shell Programming and Scripting
OS : Oracle Linux 6.5
Shell : bash
I have a file whose contents look like below. I want to count the number of occurences of strings starting with 3-.
How can I do this ? I couldn't wordwrap the below line. Hence it looks long.
'3-90892405251', '3-90892911050', '3-90893144163',... (8 Replies)
Discussion started by: John K
8 Replies
10. UNIX for Beginners Questions & Answers
Dear all,
I would like to know how to list and count unique words in thousands number of text files.
Please help me out
thanks in advance (9 Replies)
Discussion started by: imranrasheedamu
9 Replies
LEARN ABOUT DEBIAN
boggle
BOGGLE(6) BSD Games Manual BOGGLE(6)
NAME
boggle -- word search game
SYNOPSIS
boggle [-bd] [-s seed] [-t time] [-w length] [+ [+]] [boardspec]
DESCRIPTION
The object of boggle is to find as many words as possible on the Boggle board within the three minute time limit. A Boggle board is a four
by four arrangement of Boggle cubes, each side of each cube displaying a letter of the alphabet or `qu'. Words are formed by finding a
sequence of cubes (letters) that are in the game's dictionary. The (N+1)th cube in the word must be horizontally, vertically, or diagonally
adjacent to the Nth cube. Cubes cannot be reused. Words consist solely of lower case letters and must be at least 3 letters long.
Command line flags can be given to change the rules of the game.
-b Run boggle in batch mode. A boardspec must also be given. The dictionary is read from stdin and a list of words appearing in
boardspec is printed to stdout.
-d Enable debugging output.
-s seed Specify a seed seed other than the time of day.
-t time Set the time limit for each game from the default 3 minutes to time seconds.
-w length Change the minimum word length from 3 letters to length.
+ This flag allows a cube to be used multiple times, but not in succession.
++ This flag allows the same cubes to be considered adjacent to itself.
boardspec A starting board position can be specified on the command line by listing the board left to right and top to bottom.
Help is available during play by typing '?'. More detailed information on the game is given there.
BUGS
If there are a great many words in the cube the final display of the words may scroll off of the screen. (On a 25 line screen about 130
words can be displayed.)
No word can contain a 'q' that is not immediately followed by a 'u'.
When using the + or ++ options the display of words found in the board doesn't indicate reused cubes.
AUTHOR
Boggle is a trademark of Parker Brothers.
Barry Brachman
Dept. of Computer Science
University of British Columbia
BSD
April 1, 2001 BSD