Count frequency of unique values in specific column

Count frequency of unique values in specific column
# 1
01-27-2014
Count frequency of unique values in specific column

Hi, I have tab-deliminated data similar to the following:

I want to count the frequency of each individual "unique" value in the 1st column. Thus, the desired output would be as follows:

is there an that could help me out with this?
Thank you!
 owwow14 View Public Profile for owwow14 Find all posts by owwow14
# 2
01-27-2014
 Akshay Hegde View Public Profile for Akshay Hegde Find all posts by Akshay Hegde
# 3
01-27-2014
Hello,

Here is the solution for same.

Output will be as follows.

Thanks,
R. Singh
 RavinderSingh13 View Public Profile for RavinderSingh13 Find all posts by RavinderSingh13
# 4
01-27-2014
try.

or with awk as requested

---------- Post updated at 02:23 PM ---------- Previous update was at 01:53 PM ----------
 ritakadm View Public Profile for ritakadm Find all posts by ritakadm
# 5
01-27-2014
That would work only with the keywords in contiguous lines.
This User Gave Thanks to RudiC For This Post:
 RudiC View Public Profile for RudiC Find all posts by RudiC
# 6
01-27-2014
Quote:
Originally Posted by RudiC
That would work only with the keywords in contiguous lines.
yes, thank you,,, there should be for non-contiguous keywords.
 ritakadm View Public Profile for ritakadm Find all posts by ritakadm

Count number of unique values in each column of array

What is an efficient way of counting the number of unique values in a 400 column by 1000 row array and outputting the counts per column, assuming the unique values in the array are: A, B, C, D In other words the output should look like: Value COL1 COL2 COL3 A 50 51 52...

Count unique column

Hello, I am trying to count unique rows in my file based on 4 columns (2-5) and to output its frequency in a sixth column. My file is tab delimited My input file looks like this: Colum1 Colum2 Colum3 Colum4 Coulmn5 1.1 100 100 a b 1.1 100 100 a c 1.2 200 205 a d 1.3 300 301 a y 1.3 300...

Print count of unique values

Hello experts, I am converting a number into its binary output as : read n echo "obase=2;\$n" | bc I wish to count the maximum continuous occurrences of the digit 1. Example : 1. The binary equivalent of 5 = 101. Hence the output must be 1. 2. The binary...

Count occurrence of column one unique value having unique second column value

Hello Team, I need your help on the following: My input file a.txt is as below: 3330690|373846|108471 3330690|373846|108471 0640829|459725|100001 0640829|459725|100001 3330690|373847|108471 Here row 1 and row 2 of column 1 are identical but corresponding column 2 value are...

Count Unique values from multiple lists of files

Looking for a little help here. I have 1000's of text files within a multiple folders. YYYY/ /MM /1000's Files Eg. 2014/01/1000 files 2014/02/1237 files 2014/03/1400 files There are folders for each year and each month, and within each monthly folder there are...

Count specific column values

Hi all: quick question! I have the following data that resembles some thing like this: i am tired tired am i what is up hello people cool I want to count (or at least isolate) all of the unique elements in the 2nd column. I have tried this: cut -f 2 | uniq 'input' which does...

How to count specific columns and merge with unique ones?

Hi. I am not sure the title gives an optimal description of what I want to do. I have several text files that contain data in many columns. All the files are organized the same way, but the data in the columns might differ. I want to count the number of times data occur in specific columns,...

How to count Unique Values from a file.

Hi I have the following info in a file - <Cell id="25D"/> <Cell id="26A"/> <Cell id="26B"/> <Cell id="26C"/> <Cell id="27A"/> <Cell id="27B"/> <Cell id="27C"/> <Cell id="28A"/> I would like to know how would you go about counting all...

print unique values of a column and sum up the corresponding values in next column

Hi All, I have a file which is having 3 columns as (string string integer) a b 1 x y 2 p k 5 y y 4 ..... ..... Question: I want get the unique value of column 2 in a sorted way(on column 2) and the sum of the 3rd column of the corresponding rows. e.g the above file should return the...