The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
replace first instance(not first instance in line) IronHorse7 Shell Programming and Scripting 3 02-07-2008 01:29 PM
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
Single Instance sendhil Shell Programming and Scripting 2 02-14-2006 04:10 AM
Copy Db Instance cobdeng UNIX for Dummies Questions & Answers 0 01-12-2005 07:48 AM
first instance to end of log file bubba112557 Shell Programming and Scripting 2 07-16-2004 04:14 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-08-2002
peter.herlihy peter.herlihy is offline
Registered User
  
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
finding first instance

I have a file with 3 columns. Often the first two will hold the same values and the third may differ. I only want one row for each.

i.e.

aaa,bbb,1
aaa,bbb,2
aaa,bbb,3
xxx,yyy,1
xxx,yyy,2
zzz,rrr,5

Should be

aaa,bbb,1
xxx,yyy,1
zzz,rrr,5

I just want the first instance of each pariing of column 1 and 2 - and it's 3rd column value and ignore any subsequent rows with the same 1st and second column pairing.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0