Dear All
i want to compate two diff file line by line. Kindly help me.
file 1:
1;givi;01012000;wer
2;sss;02012000;rrr
3;ccc;03012000;ttt
file 2:
0;uuu;01012000;lll
1;givi;01012000;wer
2;sss;02012000;rrr
3;ccc;03012000;ttt
5;givi;01012000;hhh
Output1: comman line to both file
1;givi;01012000;wer
2;sss;02012000;rrr
3;ccc;03012000;ttt
Outpu2: line only in file 1
4:ddd;03022000;ppp
output3: line only in file 2
0;uuu;01012000;lll
5;givi;01012000;hhh
kindly help in all way.
thx in advance
rgd
jaydeep
Use grep, check the -f and -v options in the man page.
Regards
otheus
March 6, 2009, 3:27am
3
You want to check out the comm command. It outputs three columns -- those lines only in file1, those lines in both files, and those lines only in file2. You can use the -1, -2, and -3 options to suppress any of these columns.
otheus:
You want to check out the comm command. It outputs three columns -- those lines only in file1, those lines in both files, and those lines only in file2. You can use the -1, -2, and -3 options to suppress any of these columns.
can u pls explain the code
as me too trying but not getting o/p