urbs33 has asked for the wisdom of the Perl Monks concerning the following question:
Perl Monks,
I am looking for some input on filtering a csv to unique records based on a specified field. I have a list of records that may exist on multiple servers. I am generating a list of the files, and some additional information about them, including the server that they reside on. I only want to output one record of the file, even if it is one multiple servers. Let's suppose that the field to match is field one. I will have something like this.,
unique_id,server_name,modification_date,size,another_field,another_field,
There are thousands of lines in this file. If one fo the files from this report is copied to another server, the unique_names will match, but the server name will not. I only want one record of each unique_name considered int his report and do not care from which server name. This is a unix OS, so if there is an easier way to do it with awk, sort|uniq, or other native commands, I am open to that. I'm just kinda stumped since the rest of the line will not match exactly.
Thanks!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remove lines that contain matching values from csv.
by Anonymous Monk on Oct 08, 2012 at 16:01 UTC | |
|
Re: Remove lines that contain matching values from csv.
by BrowserUk (Patriarch) on Oct 08, 2012 at 16:09 UTC | |
|
Re: Remove lines that contain matching values from csv.
by fluffyvoidwarrior (Monk) on Oct 09, 2012 at 15:52 UTC |