Sponsored Content
Top Forums UNIX for Dummies Questions & Answers searching and displaying most commonly used words Post 302135550 by arunsubbhian on Monday 10th of September 2007 01:35:10 PM
Old 09-10-2007
Data searching and displaying most commonly used words

Hi guys,

i need to search the most commonly occuring words in a file and display their counts of about 30000 words and the words shud not be of typ specified in file 2 e. words like is,for,the,an,he,she etc...

k.

file1:
ALICE was beginning to get very tired of sitting by her sister on the bank and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, "and what is the use of a book," thought Alice, "without pictures or conversations?'

So she was considering, in her own mind (as well as she could, for the hot day made her feel very sleepy and stupid), whether the pleasure of making a daisy-chain would be worth the trouble of getting up and picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her.

file2:
was to get of by her on the etc....

output:

ALICE : 1
begining : 1 etc...


Cud u help me with thisSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

searching and displaying help

I have two input files like this: File-1 ----- a1234 abc town f2345 def village t5678 pqr county File-2 ------ 123456 test1 test2 test3 id-a1234 789012 test2 test4 id-t5678 456789 test7 id-b1234 I want to check the lines that match the first field of File-1 in... (7 Replies)
Discussion started by: ajay41aj
7 Replies

2. Shell Programming and Scripting

Searching words in a file containing a pattern

Hi all, I would like to print words in a file seperated by whitespaces containing a specific pattern like "=" e.g. I have a file1 containing strings like %cat file1 The= some= in wish= born <eof> .I want to display only those words containing = i.e The= , some=,wish= ... (5 Replies)
Discussion started by: sree_123
5 Replies

3. Shell Programming and Scripting

searching for words between delimeters from the rear

Hi, i need to pick up dates and times from the file names which are of unequal length. The dates and time are delimited by dot. I am interested in getting the strings between the delimeter for fields -3, -4, -5 from behind (rear) so that the out put looks like : 071118.011300.556 I have... (2 Replies)
Discussion started by: oktbabs
2 Replies

4. Shell Programming and Scripting

Perl searching special words in lines

Hi , i am a new with perl, i want to made a script that find in file rows that start with specil words, as an example a line will start with" ............................................. specialword aaa=2 bbb=5 ............................................. and to put this in a new file... (3 Replies)
Discussion started by: alinalin
3 Replies

5. Shell Programming and Scripting

Shell script to find out words, replace them and count words

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. UNIX for Dummies Questions & Answers

Searching for multiple words on a line in any order issue

Hi again I have figured out how to be able to sort through lines in a file with multiple words in any order and display them using this command: cat file | grep -i $OPTION1 | grep -i $OPTION2 | grep -i $OPTION3 OPTION1 is 2008, OPTION2 is Mar, OPTION 3 is Tue Result: Tue Mar 25... (4 Replies)
Discussion started by: semaj
4 Replies

7. Shell Programming and Scripting

Awk: Searching for length of words between slash character

Dear UNIX Community, I have a set of file paths like the one below: \\folder name \ folder1 \ folder2 \ folder3 \ folder4 \\folder name \ very long folder name \ even longer name I would like to find the length of the characters (including space) between the \'s. However, I want... (6 Replies)
Discussion started by: vnayak
6 Replies

8. Shell Programming and Scripting

Finding my lost file by searching for words in it

Got a question for you guys...I am searching through a public directory (that has tons of files) trying to find a file that I was working on a longggggg time ago. I can't remember what it is called, but I do remember the content. It should contains words like this: Joe Pulvo botnet zeus... (5 Replies)
Discussion started by: statichazard
5 Replies

9. UNIX for Dummies Questions & Answers

searching words & print prefixed string after it

I have a text which I divided them into sentences and now printed them in a rows. I want to get the list of most of words ( the, and, a) and print 5 words after them (so 6 with the word itself). I have created an acceptfile with those rows and using grep but I have rows that have these words more... (2 Replies)
Discussion started by: A-V
2 Replies

10. Shell Programming and Scripting

Gawk gensub, match capital words and lowercase words

Hi I have strings like these : Vengeance mitt Men Vengeance gloves Women Quatro Windstopper Etip gloves Quatro Windstopper Etip gloves Girls Thermobite hooded jacket Thermobite Triclimate snow jacket Boys Thermobite Triclimate snow jacket and I would like to get the lower case words at... (2 Replies)
Discussion started by: louisJ
2 Replies
Text::Lorem(3pm)					User Contributed Perl Documentation					  Text::Lorem(3pm)

NAME
Text::Lorem - Generate random Latin looking text SYNOPSIS
use Text::Lorem; my $text = Text::Lorem->new(); # Generate a string of text with 5 words $words = $text->words(5); # Generate a string of text with 2 sentences $sentences = $text->sentences(2); # Generate 3 paragraphs $paragraphs = $text->paragraphs(3); DESCRIPTION
Often when developing a website or other application it's important to have placeholders for content. This module generates prescribed amounts of fake Latin text. CONSTRUCTOR
"new()" The default constructor, "new()" takes no arguments and returns a Text::Lorem object. METHODS
"words( INTEGER )" Returns INTEGER fake Latin words. "sentences( INTEGER )" Returns INTEGER sentences in fake Latin. "paragraphs( INTEGER )" Returns INTEGER paragraphs of fake Latin text. THANKS
Thanks to the guys who pushed me off the cliff called comfort and into the scary world of Perl: James Duncan, Leon Brocard. AUTHOR
Adeola Awoyemi (adeola@fotango.com) SEE ALSO
L<WWW::Lipsum> and L<http://lipsum.com/> COPYRIGHT
Copyright 2003 Fotango Ltd. All rights reserved. <http://opensource.fotango.com/> This software is released under the same license as Perl itself. perl v5.10.1 2011-01-05 Text::Lorem(3pm)
All times are GMT -4. The time now is 02:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy