Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: I want to remove duplicate based on specific column and value.

by mr_ron (Chaplain)
on May 25, 2018 at 14:42 UTC ( [id://1215216]=note: print w/replies, xml ) Need Help??


in reply to I want to remove duplicate based on specific column and value.

This terse approach may hint at future possibilities for text file hackery:

perl -M5.010 -Mstrict -F, -wanle ' BEGIN{ $" = "," } our ($rpt, $non_key); if ( ($non_key // "") eq "@F[1..5]"){ print; # this line not right - exercise left to reader } else { $rpt = $F[4] -1; $non_key = "@F[1..5]"; print } '
Ron

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1215216]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-20 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found