The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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 duplicates in columns and removing lines totus Shell Programming and Scripting 17 11-29-2008 11:27 AM
using sed to get rid of duplicated columns... fedora Shell Programming and Scripting 5 11-28-2008 10:45 AM
remove duplicated columns kamel.seg Shell Programming and Scripting 6 02-21-2008 07:36 AM
Removing lines that are (same in content) based on columns adsforall UNIX for Dummies Questions & Answers 7 11-09-2007 12:13 PM
remove duplicated lines without sort lalelle Shell Programming and Scripting 6 08-21-2007 08:44 AM

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 05-16-2008
yahyaaa's Avatar
yahyaaa yahyaaa is offline
Registered User
  
 

Join Date: May 2008
Location: Jordan
Posts: 89
Help removing lines with duplicated columns

Hi Guys...

Please Could you help me with the following ?

aaaa bbbb cccc sdsd
aaaa bbbb cccc qwer

as you can see, the 2 lines are matched in three fields...
how can I delete this pupicate ? I mean to delete the second one if 3 fields were duplicated ?

Thanks
  #2 (permalink)  
Old 05-16-2008
fabtagon fabtagon is offline
Registered User
  
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 189
i) Use useful topics!
ii)

Code:
awk -F" " '! something[$3]++' inputfile

  #3 (permalink)  
Old 05-16-2008
yahyaaa's Avatar
yahyaaa yahyaaa is offline
Registered User
  
 

Join Date: May 2008
Location: Jordan
Posts: 89
Hi again

Could you explain this command for me ....
  #4 (permalink)  
Old 05-16-2008
yahyaaa's Avatar
yahyaaa yahyaaa is offline
Registered User
  
 

Join Date: May 2008
Location: Jordan
Posts: 89
Hi again

and what do u mean by " Use useful topics "...

Regards
  #5 (permalink)  
Old 05-16-2008
fabtagon fabtagon is offline
Registered User
  
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 189
You've named this thread - your question - simply "help". It would be much better to use something like "removing duplicate lines".

And well, I see you've finally used the board search finding duplicates in columns and removing lines .

Let's put it together:
i) you've used a meaningless topic
ii) you've posted your problem three times
iii) you've already found a thread in which you problem is answered and explained

Do you really believe this will motivate me to explain this to you? I don't.
  #6 (permalink)  
Old 05-16-2008
yahyaaa's Avatar
yahyaaa yahyaaa is offline
Registered User
  
 

Join Date: May 2008
Location: Jordan
Posts: 89
Hi again

Dear fabtagon.....

I posted this topic in 3 different places to make sure that my problem can be handled by someone who can deal well enough with Unix.. and as I expected, someone came, like you, and gave a solution that makes no sense at all... thats why I had to post it in different places.. GOT IT !!

Please if you have a stright answer... be my guest, otherwise... go and practice som unix commands.....
Cappich ???

Warm regards Bozo
Closed Thread

Bookmarks

Tags
unix commands

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 09:46 AM.


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