Sponsored Content
Top Forums Shell Programming and Scripting return a list of unique values of a column from csv format file Post 302361294 by daptal on Monday 12th of October 2009 11:39:06 PM
Old 10-13-2009
Code:
 cat abc.csv
SNP, SampleID, Allele1, Allele2
A001,AB1,A,A
A002,AB1,A,A
A003,AB1,A,A

Instead of abc.csv substitute your csv file name
Code:
$ cat abc.csv  | cut -f1 -d , | uniq
SNP
A001
A002
A003

HTH,
PL
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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... (6 Replies)
Discussion started by: amigarus
6 Replies

2. Shell Programming and Scripting

AWK, Perl or Shell? Unique strings and their maximum values from 3 column data file

I have a file containing data like so: 2012-01-02 GREEN 4 2012-01-02 GREEN 6 2012-01-02 GREEN 7 2012-01-02 BLUE 4 2012-01-02 BLUE 3 2012-01-02 GREEN 4 2012-01-02 RED 4 2012-01-02 RED 8 2012-01-02 GREEN 4 2012-01-02 YELLOW 5 2012-01-02 YELLOW 2 I can't always predict what the... (4 Replies)
Discussion started by: rich@ardz
4 Replies

3. Shell Programming and Scripting

List unique values and count instances in .csv file

I need to take the second column of a .csv file and count the number of instances of each unique value in that same second column. I'd like the output to be value,count sorted by most instances. Thanks for any guidance! Data example: 317476,317756,0 816063,318861,0 313123,319091,0... (4 Replies)
Discussion started by: batcho
4 Replies

4. UNIX for Dummies Questions & Answers

Grep to find matching patern and return unique values

Request: grep to find given matching patern and return unique values, eliminate the duplicate values I have to retrieve the unique folder on the below file contents like; /app/oracle/build_lib/pkg320.0_20120927 /app/oracle/build_lib/pkg320.0_20121004_prof... (5 Replies)
Discussion started by: Siva SQL
5 Replies

5. Shell Programming and Scripting

Remove the values from a certain column without deleting the Column name in a .CSV file

(14 Replies)
Discussion started by: dhruuv369
14 Replies

6. Linux

To get all the columns in a CSV file based on unique values of particular column

cat sample.csv ID,Name,no 1,AAA,1 2,BBB,1 3,AAA,1 4,BBB,1 cut -d',' -f2 sample.csv | sort | uniq this gives only the 2nd column values Name AAA BBB How to I get all the columns of CSV along with this? (1 Reply)
Discussion started by: sanvel
1 Replies

7. Shell Programming and Scripting

Extracting unique values of a column from a feed file

Hi Folks, I have the below feed file named abc1.txt in which you can see there is a title and below is the respective values in the rows and it is completely pipe delimited file ,. ... (4 Replies)
Discussion started by: punpun66
4 Replies

8. Shell Programming and Scripting

Using grep and a parameter file to return unique values

Hello Everyone! I have updated the first post so that my intentions are easier to understand, and also attached sample files (post #18). I have over 500 text files in a directory. Over 1 GB of data. The data in those files is organised in lines: My intention is to return one line per... (23 Replies)
Discussion started by: clippertm
23 Replies

9. Shell Programming and Scripting

CSV File:Filter duplicate records from column1 & another column having unique record

Hi Experts, I have csv file with 30, 40 columns Pasting just 2 column for problem description. Need to print error if below combination is not present in file check for column-1 (DocumentNumber) and filter columns where value in DocumentNumber field is same. For all such rows, the field... (7 Replies)
Discussion started by: as7951
7 Replies
AUINFO(1)						      General Commands Manual							 AUINFO(1)

NAME
auinfo - show information about a Network Audio System server SYNOPSIS
auinfo [-audio servername] DESCRIPTION
The auinfo program provides information describing a Network Audio System server. It lists the capabilities of the server, the devices that are attached to it, the data formats that are accepted, and any predefined sounds that have been stored in the server. EXAMPLE
The following example shows the output produced by auinfo when connected to an NCD MCX(tm) display station: Audio Server: tcp/lemkemcx:8000 Version Number: 2.0 Vendor: Network Computing Devices Inc. Vendor Release: 3000 Min Sample Rate: 1000 Max Sample Rate: 52000 Max Tracks: 32 Number of Formats: 7 Formats: ULAW8 LinearUnsigned8 LinearSigned8 LinearSigned16MSB LinearUnsigned16MSB LinearSigned16LSB LinearUnsigned16LSB Number of Elem Types: 11 Element Types: ImportClient ImportDevice ImportBucket Bundle MultiplyConstant AddConstant Sum ExportClient ExportDevice ExportBucket ExportMonitor Number of Wave Forms: 0 Number of Actions: 2 Actions: ChangeState SendNotify Number of Devices: 5 Device 0: Changable: Gain LineMode ID: 0x34 Kind: PhysicalInput Use: Import Format: LinearSigned16MSB Num Tracks: 1 Access: Import List Description: "Mono Channel Input" Min Rate: 1000 Max Rate: 52000 Location: Left Right External Gain Percent: 15 Line Mode: High Device 1: Changable: Gain ID: 0x32 Kind: PhysicalOutput Use: Export Format: LinearSigned16MSB Num Tracks: 2 Access: Export List Description: "Stereo Channel Output" Min Rate: 1000 Max Rate: 52000 Location: Left Right External Gain Percent: 24 Num Children: 2 Children: 0x30 0x31 Device 2: Changable: Gain ID: 0x33 Kind: PhysicalOutput Use: Export Format: LinearSigned16MSB Num Tracks: 1 Access: Export List Description: "Mono Channel Output" Min Rate: 1000 Max Rate: 52000 Location: Left Right External Gain Percent: 24 Num Children: 2 Children: 0x30 0x31 Device 3: Changable: Gain ID: 0x31 Kind: PhysicalOutput Use: Export Format: LinearSigned16MSB Num Tracks: 1 Access: Export List Description: "Right Channel Output" Min Rate: 1000 Max Rate: 52000 Location: Right External Gain Percent: 24 Num Children: 0 Device 4: Changable: Gain ID: 0x30 Kind: PhysicalOutput Use: Export Format: LinearSigned16MSB Num Tracks: 1 Access: Export List Description: "Left Channel Output" Min Rate: 1000 Max Rate: 52000 Location: Left External Gain Percent: 24 Num Children: 0 Number of Buckets: 0 Bucket 0: ID: 0x1400008 Kind: Bucket Use: Import Export Format: ULAW8 Num Tracks: 1 Access: Import Export Destroy List Description: "Monty Python - Australian Table Wines" Sample Rate: 8000 Num Samples: 697944 Bucket 1: ID: 0x1400007 Kind: Bucket Use: Import Export Format: LinearUnsigned8 Num Tracks: 1 Access: Import Export Destroy List Description: ""I'm sorry Dave, I can't do that" - HAL from 2001" Sample Rate: 22255 Num Samples: 85504 Bucket 2: ID: 0x1400006 Kind: Bucket Use: Import Export Format: LinearUnsigned8 Num Tracks: 1 Access: Import Export Destroy List Description: ""He's dead, Jim" - Dr. McCoy" Sample Rate: 11128 Num Samples: 31602 ENVIRONMENT
AUDIOSERVER This variable specifies the default audio server to contact if -audio is not specified on the command line. DISPLAY If AUDIOSERVER is not set, this variable is examined to find the name of the corresponding X Window System display. SEE ALSO
nas(1) COPYRIGHT
Copyright 1993, 1994 Network Computing Devices, Inc. See nas(1) for a full statement of rights and permissions. AUTHOR
Jim Fulton, Network Computing Devices, Inc. 1.9.3 AUINFO(1)
All times are GMT -4. The time now is 03:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy