lambden has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I've been trying to work this out for myself but I feel I'm missing something fundamental and without guidance I won't be able to complete this quest:
I have a text file which is outputted by a automated router provisioning system, the file is in the following format:
Date time IPaddress Action
As the file is produced each line in the file contains the current Date and time so therefore each line in the file is unique because the time changes. However the IPaddress and Action part of each line may contain duplicates, its these duplicates I want to remove but still keep the output in time order.
I can produce output which excludes the duplicate IPaddress and Actions but the field which contains the time has to be removed as it causes all lines to be unique.
So how do I go about creating this ??Janitored by davido to provide formatting based on OP's direct input. See Writeup Formatting Tips for details.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Removing duplicate entries in a file which has a time stamp on each line
by Old_Gray_Bear (Bishop) on Jan 18, 2006 at 21:25 UTC | |
|
Re: Removing duplicate entries in a file which has a time stamp on each line
by explorer (Chaplain) on Jan 18, 2006 at 21:30 UTC | |
|
Re: Removing duplicate entries in a file which has a time stamp on each line
by Random_Walk (Prior) on Jan 18, 2006 at 21:37 UTC | |
|
Re: Removing duplicate entries in a file which has a time stamp on each line
by BrowserUk (Patriarch) on Jan 18, 2006 at 21:41 UTC | |
|
Re: Removing duplicate entries in a file which has a time stamp on each line
by graff (Chancellor) on Jan 19, 2006 at 04:01 UTC |