|
shell script for comparing 2 files
Hi,
how to read the 2 files and compare each other in shell script? i have 2 files test1 and test2, both files contains 20 character records.we have to compare file 1 records with file2, if exists then reject the record else we have to append it to test2 file. in file test1 around 100 single column records are there. and test2 around 50000 single column records.
how can we do in shell script?
ex: test1
burningburning21sstt
ex:test2
burningburning21eett
we need to compare only first 16 letters of the record like
if test1.burningburning21 = test2.burningburning21 then reject.
Thanks in advance
|