hi all,
very need help urgently
i have a problem compare 2 files from solaris, the 2 files its shown below:
data1.log :
6512345678 6512345677 20070131 073824 420
6511111111 6522222222 20070131 103747 87
6522222222 6233333333 20070131 120855 31
6533333333 6244444444 20070131 121006 48
data2.log:
P 055006.410 20070131 073824 6511111111 510000000000000 6511111111 00 0 000 012 0 0 0
P 055006.530 20070131 103747 6522222222 510000000000000 6522222222 00 0 000 003 0 0 0
P 055006.531 20070131 120855 6533333333 510000000000000 6533333333 00 0 000 004 0 0 0
P 055006.590 20070131 121006 11111111111 510000000000000 11111111111 00 0 000 003 0 0 0
P 055006.650 20070131 133333 222222222 510000000000000 22222222222 00 0 000 003 0 0 0
compare from data1.log to data2.log on column 1, column 3 and column 4 for data1.log compare with column 3, column 4 and column 7 for data2.log
if match and write it to files.
expected output is:
success :
6511111111 6522222222 20070131 103747 87
P 055006.410 20070131 073824 6511111111 510000000000000 6511111111 00 0 000 012 0 0 0
6522222222 6233333333 20070131 120855 31
P 055006.530 20070131 103747 6522222222 510000000000000 6522222222 00 0 000 003 0 0 0
6533333333 6244444444 20070131 121006 48
P 055006.531 20070131 120855 6533333333 510000000000000 6533333333 00 0 000 004 0 0 0
fail :
6512345678 6512345677 20070131 073824 420
fail output if data on data1.log not found in data2.log
please need advices with script or using syntax command
thank you so much
regards,
bucci