Grouping items by match set
<p>I am trying to parse a large amount of configuration files and group the results into separate groups based by content - I just do not know how to approach this.  For example, say I have the following data in 3 files:</p>

<pre>
config1.txt
ntp 1.1.1.1
ntp 2.2.2.2

config2.txt
ntp 1.1.1.1

config3.txt
ntp 2.2.2.2
ntp 1.1.1.1

config4.txt
ntp 2.2.2.2
</pre>

<pre>
The results would be:
Sets of unique data 3:
Set 1 (1.1.1.1, 2.2.2.2): config1.txt, config3.txt
Set 2 (1.1.1.1): config2.txt
Set 3 (2.2.2.2): config4.txt
</pre>

<p>I understand how to glob the directory of files, loop the glob results and open each file at a time, and use regex to match each line.  The part I do not understand is how I could store these results and compare each file to a set of result, even if the entries are out of order, but a match entry wise.  Any help would be appreciated.</p>

<p>Thanks!</p>
