Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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).


Comment on Re^2: Remove Duplicates!! Please Help
Select or Download Code
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2014-12-17 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (31 votes), past polls