I have a one file and it looks like this.
|OldCname|NewCname|OldADD|NewADD|OldPhone|newPhone|
|A|A|123|124|5551212|55151212|
--This is an example. The first row has the names of the columns.
-- all rows after have data. All COLUMNS are seperated by the same seperation character. here it is the -> |
if you count the (( # of '|' )-1)/2 you get 3 which is how many compares for each row.
I want to compare each pair. The columns are of varying length. This is why I am using the seperator ( old|new) .
I would like an an output file that spells out each difference for each line. No output for matches.
For example in the output file.
I would see
Line 1: OldCname -> 123, NewCname -> 124
Line 1: OldPhone -> 5551212, NewPhone -> 5511212
...... for any non matched pair on a line.
and so on for each line that do not have a match for any pair. The number of old/new pairs can be long and is variable, but always in pair groups.
The three variables I see are the
Seperator, number of pairs and the output file to store the diff info.
Any help would be appreciated.
|OldCname|NewCname|OldADD|NewADD|OldPhone|newPhone|
|A|A|123|124|5551212|55151212|
--This is an example. The first row has the names of the columns.
-- all rows after have data. All COLUMNS are seperated by the same seperation character. here it is the -> |
if you count the (( # of '|' )-1)/2 you get 3 which is how many compares for each row.
I want to compare each pair. The columns are of varying length. This is why I am using the seperator ( old|new) .
I would like an an output file that spells out each difference for each line. No output for matches.
For example in the output file.
I would see
Line 1: OldCname -> 123, NewCname -> 124
Line 1: OldPhone -> 5551212, NewPhone -> 5511212
...... for any non matched pair on a line.
and so on for each line that do not have a match for any pair. The number of old/new pairs can be long and is variable, but always in pair groups.
The three variables I see are the
Seperator, number of pairs and the output file to store the diff info.
Any help would be appreciated.