![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Finding the total of a column using awk | ironhead3fan | Shell Programming and Scripting | 8 | 01-30-2009 06:59 AM |
| How to check Null values in a file column by column if columns are Not NULLs | Mandab | Shell Programming and Scripting | 7 | 03-15-2008 09:57 AM |
| finding duplicate files by size and finding pattern matching and its count | jerome Sukumar | Shell Programming and Scripting | 2 | 12-01-2006 04:20 AM |
| Replace 10th column with a new column--- Terriblly hurry | ahmedwaseem2000 | Shell Programming and Scripting | 2 | 09-06-2005 02:10 AM |
| Finding a column in a flatfile | peter.herlihy | UNIX for Dummies Questions & Answers | 3 | 01-07-2002 08:08 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Finding the most common entry in a column
Hi,
I have a file with 3 columns in it that are comma separated and it has about 5000 lines. What I want to do is find the most common value in column 3 using awk or a shell script or whatever works! I'm totally stuck on how to do this. e.g. value1,value2,bob value1,value2,bob value1,value2,bob value1,value2,dave value1,value2,james Clearly in the above example the most popular value in column3 is "bob", but how would I write a script to work this out? Many thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|