in reply to Re: Filter out an input file with a given waiver file, and output to a specific file
in thread Filter out an input file with a given waiver file, and output to a specific file

Hi dbander

I would tend to do it the other way around: store the waivers into a hash (a simple hash) where the key is the common identifier between the two files, and then read the violations file line by line, changing the content of the line when the identifier is common between the two files and writing the line to the new files. This is often more efficient this way.

But since we don't know about the size of the violations and waivers files, it actually may be that your solution is better (especially if there are many more waivers than violations, but that's seems rather unlikely).

  • Comment on Re^2: Filter out an input file with a given waiver file, and output to a specific file

Replies are listed 'Best First'.
Re^3: Filter out an input file with a given waiver file, and output to a specific file
by dbander (Scribe) on Jul 13, 2017 at 12:11 UTC

    Hi Laurent_R

    Agreed, that would be an excellent production design consideration.