Unless you mean
my %b = ((map {s,^$bpath/,,; $_ => 1} <$bpath/*.csv>),
(map {s,^$cpath/,,; $_ => 1} <$cpath/*.csv>));
Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.
File 90.215.242.262.csv has the following differences:
raw SubnetName=
merged SubnetName=mig-
raw AllowDHCPClientsModifyDynamicObjectResourceRecords=Same As in Global
merged AllowDHCPClientsModifyDynamicObjectResourceRecords=False
I wrote the first script, but I don't understand what the significance of the 3rd directory is?
for example,
if a file (call it X) is only found in A and B (and not in C).... what do you want to have happen? diff A and B, and report on the missing C?
if the file exists in A, B, and C, but the contents differ in all three, how do you want it reported. If the contents only differ in one of the three files...
But the code you added doesn't deal with any of these issues...
The issue is this, I have 2 systems that will be merged into one, so systems A and B are totally two different systems. The goal is I am try to achieve is to mesh these two systems into 1 system.
So.... originally we had a compare between system A called "raw" to the system that is merged already named "merged"
All we are doing to the equation is adding the 2nd system called "raw2" to compare with "merged"
A=raw
B=raw 2
C=merged
Take the raw csv files form A and B and compare whats in C and report just like you did originally on top. All I am asking is to add another directory to comparison
I think the answer is this to your question on the above thread:
"if a file (call it X) is only found in A and B (and not in C).... what do you want to have happen? diff A and B, and report on the missing C?"
So where are the paths defined for raw, raw2 and merged? I dont see it above?
the orginal has these defined
my $apath = "d:/raw";
my $bpath = "d:/merged";
my $cpath = "d:/raw2";
my %a = map {s,^$apath/,,; $_ => 1} <$apath/*.csv>;
my %b = map {s,^$bpath/,,; $_ => 1} <$bpath/*.csv>;
my %c = map {s,^$cpath/,,; $_ => 1} <$cpath/*.csv>;So where are the paths defined for raw, raw2 and merged? I dont see it above?
I'm suggesting running the script against the three directories in a pairwise ordering... Otherwise, this is going to devolve into guessing what you want outputted in a 3-way diff...of which there are many possibilities.
If you had tried the code, you would have seen that it ran, or if it didn't run in your environment, you could have posted the error it generated. That would have been faster than me saying I thought the code was correct and you then trying it.
Simply put, no one here really knows what type of output you want from a 3-way diff, or in fact, if you actually want a 3-way diff, or just a 2-way diff with different inputs.
I modified the original code to do a 2-way diff which takes the paths from the command line... therefore you can compare raw with merged, raw2 with merged, and raw against raw2 if you want. This may be all that you need, but if not, we can then work from there to see what you really want.... rather than making a guess that is almost certain to be wrong.
IT issues often require a personalized solution. With Ask the Experts™, submit your questions to our certified professionals and receive unlimited, customized solutions that work for you.
Premium Content
You need an Expert Office subscription to comment.Start Free Trial