The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to remove duplicate records with out sort svenkatareddy Shell Programming and Scripting 19 06-11-2008 03:10 PM
Duplicate records from oracle to text file. shilendrajadon UNIX for Advanced & Expert Users 1 01-10-2008 11:21 AM
Remove all instances of duplicate records from the file vukkusila Shell Programming and Scripting 3 12-12-2007 07:50 AM
Records Duplicate ganesh123 Shell Programming and Scripting 9 02-22-2007 08:47 AM
How to extract duplicate records with associated header record run_eim UNIX for Dummies Questions & Answers 17 01-16-2007 11:46 PM

Closed Thread
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
  #1 (permalink)  
Old 02-28-2008
svenkatareddy svenkatareddy is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 22
How to remove duplicate records with out sort

Can any one give me command How to delete duplicate records with out sort.

Suppose if the records like below:

345,bcd,789
123,abc,456
234,abc,456
712,bcd,789

out tput should be
345,bcd,789
123,abc,456

Key for the records is 2nd and 3rd fields.fields are seperated by colon(,).
  #2 (permalink)  
Old 02-28-2008
robotronic's Avatar
robotronic robotronic is offline Forum Advisor  
Can I play with madness?
  
 

Join Date: Apr 2002
Location: Italy
Posts: 370
Try this:

Code:
nawk -F',' '!x[$2$3]++' input_file

  #3 (permalink)  
Old 02-28-2008
svenkatareddy svenkatareddy is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 22
Thanks..

It's working
Closed Thread

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 01:36 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