Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Remove Duplicates!! Please Help

by davidrw (Prior)
on Jan 03, 2008 at 15:58 UTC ( #660233=note: print w/replies, xml ) Need Help??


in reply to Re: Remove Duplicates!! Please Help
in thread Remove Duplicates!! Please Help

While i love uniq, it's not a solution here. OP said "I want to remove duplicate entries for one single instance of COMPUTER column." Not eliminate duplicate lines, which your uniq examples doe.

My first action after reading OP was to man uniq -- there's options to "avoid comparing the first N fields" and "avoid comparing the first N characters", but unfortunately neither of those work for comparing just the first column (of a tab-delim'd file).

Replies are listed 'Best First'.
Re^3: Remove Duplicates!! Please Help
by jbert (Priest) on Jan 03, 2008 at 16:00 UTC
    Fair point, sorry. I misread the sample data and gave an alternative to the (also incorrect) perl version above. Thanks for the catch.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://660233]
help
Chatterbox?
[choroba]: Cleansing of the Temple
[zentara]: Unicorns are not conceived, they are created. Unicorns don't want another life. :-)
[erix]: you go check your data LanX :P
[Your Mother]: marto++ (me as well)
[zentara]: choroba I stand corrected, I guess Jesus killed a tree once too.
[erix]: the neighbours (a nat.hist. museum) have a narwhal skull with *2* tusks
[erix]: ( also: UniCorn Throne )
[zentara]: erix I hope both tusks pointed in the same direction :-)
LanX "♪..♫ Last night a DJ killed my wife ♪..♫ "

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (15)
As of 2017-03-30 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (361 votes). Check out past polls.