I am writing a comparator script, which comapre two txt files(column by column)
below are the precondition of this comparator
1)columns of file are not seperated
where charactr 1-5 if field1
character 6-9 is file2 etc.
second file is also same structure. but the filed1 of file1 may differ from field1 of file2.
the position of fields is taken from third file (just call it Field_desc.csv)
from this file => we can take a field position and its length
1) i am reading all files, but how to cut a specific column of a file(not line by line). I need entire column in a seperate variable.
field1 of file1
field1 of file2
=> I am not getting above result.
2) now I will perform the diff command or check line1 of file1 is equal to line1 of file2. need result as below
field1 of file1 field1 of file2 Result
88888 95789 "Error not equal value"
12435 89457 "Error not equal value"
89458 57895 "Error not equal value"
3) Script is executed as below
perl Script_compare.pl File1.txt File2.txt Filed_Desc.csv
and result must be writeen in another file "Result.log"
please help me. I was in second position "not able to cut the file in column basis.