I have two input files 1)datafile 2)metadata file.
I have a metadata file like:
field1datatypeformat1number2string3dateyy-mm-dd
I have a data file like:
1234abc12-8-16 xyz234512-9-163456acd14-08-12
In the first row there is no correction as everything is inline with the metadata.
In the second row,the first field is string instead of number.So I shoud get error for the corresponding row in field 1.
In the third row,the date format should be yy-mm-dd ,but here it is 14-08-12 .the year cannot be 14.It shuold throw error for the corresponding field.
I need a unix shell script for validating .
Could anyone please help me in this regard?
Thanks in advance
KVB