Sunday, June 20, 2004

Sort Difference between 2 files

file1

[root@mybox unix]# cat file1
This is line 1

This is line 2

This is line 3

file2

[root@mybox unix]# cat file2
This is line 1
This is line 3

[root@mybox unix]# diff -by file1 file2
This is line 1 This is line 1
<
This is line 2 <
<
This is line 3 This is line 3
[root@mybox unix]#