LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2012, 06:03 PM   #1
stevo520
LQ Newbie
 
Registered: Jun 2012
Posts: 9

Rep: Reputation: Disabled
Question wc to list most common words


I am not sure but I think I should be able to use the wc command to somehow list the most common words in a file in order of the most used first and so on? Is it possible?
 
Old 06-26-2012, 06:20 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I'll just point you in the right direction...
Try 'wc -w' http://linux.die.net/man/1/wc and you'll need 'sort -u' http://linux.die.net/man/1/sort and some wrapper code.

http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/
 
Old 06-26-2012, 06:30 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
For good measure I'll suggest ignoring wc for the task at hand, and
concentrate on "strings", "sort", and "uniq" ...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
indexing list of words in a file johannni Linux - Newbie 5 11-29-2011 05:47 PM
looking for a program to display random words from list newbiesforever Linux - Software 10 04-23-2011 01:21 PM
Python: replacing all words found on a list General Programming 3 03-15-2010 08:57 AM
Getting Range of Words from Arg List tonyfreeman Programming 3 10-05-2006 03:35 PM
Sorting a list of words in LISP! Hady Programming 1 05-01-2004 03:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration