Compare the source definition file with data file

Hi

How to compare the source definition file in unix with the data file .

Please can you share me example if some one has done it before

Hi,

You'll have to be a bit more specific here, compare what file with what file?

There are a number of utilities for file comparison in unix, so an example of what you require would help.

Regards

Gull04

Hi Gull

I have a requirement to validate the data in the txt file based on the source definition file.
I have a data file emp.txt and source definition file emp_src_def.dat with the definition of the data types , length and not null constraint. how do I compare the the both files using a shell script

emp.txt :

H|INV001|20|10-MAY-2015|invoice1 created
H|INV002|30|19-MAY-2015|invoice2 created
L|690845|INV001|LINE|1|10|travel expense for emp102
L|690846|INV001|LINE|2|10|dinner expense
L|690847|INV002|LINE|1|30|travel expense for emp238
T|000005|2|3|50

source_def_emp.dat :

H|CHAR(5)|NUMBER|DATE (DD-MON-YYYY)|CHAR(100)
L|NUMBER NOTNULL|CHAR(5)|CHAR(5)|NUMBER|NUMBER|CHAR(100)

Regards
Raj

Moderator comments were removed during original forum migration.