How do I dedup or filter out data with condition? For example: Below I want to filter out row that contains name="name0". The condition should be able to handle any IPs on the ip field because...
See more...
How do I dedup or filter out data with condition? For example: Below I want to filter out row that contains name="name0". The condition should be able to handle any IPs on the ip field because the IP could change, in the real data the IPs are a lot more. The name0 is not in order. The dedup/filter should not be applied to IPs that doesn't contain "name0" AND it should not be applied to unique IP that has "name0" Thank you for your help. Data: ip name location 1.1.1.1 name0 location-1 1.1.1.1 name1 location-1 1.1.1.2 name2 location-2 1.1.1.2 name0 location-20 1.1.1.3 name0 location-3 1.1.1.3 name3 location-3 1.1.1.4 name4 location-4 1.1.1.4 name4b location-4 1.1.1.5 name0 location-0 1.1.1.6 name0 location-0 Expected output: ip name location 1.1.1.1 name1 location-1 1.1.1.2 name2 location-2 1.1.1.3 name3 location-3 1.1.1.4 name4 location-4 1.1.1.4 name4b location-4 1.1.1.5 name0 location-0 1.1.1.6 name0 location-0 | makeresults format=csv data="ip, name, location
1.1.1.1, name0, location-1
1.1.1.1, name1, location-1
1.1.1.2, name2, location-2
1.1.1.2, name0, location-20
1.1.1.3, name0, location-3
1.1.1.3, name3, location-3
1.1.1.4, name4, location-4
1.1.1.4, name4b, location-4
1.1.1.5, name0, location-0
1.1.1.6, name0, location-0"