On 2009-12-02 10:56, hadi motamedi wrote: > But "#diff -y" compares the two files in line-by-line basis . But my two > files do not have one-to-one correspondence , say row#1 in file1 maybe > the same as say row#5 in file2 . So I seek a way that does not consider > this as a difference (but diff will consider). (( First, please do not top-post. )) "diff" would match the line2 in file1 with the line5 in file2, and it would mark that some lines were inserted there. I think you'll have to specify more what you mean by "compare", and what you think is different or same. -- Paul Bijnens, Xplanation Technology Services Tel +32 16 397.525 Interleuvenlaan 86, B-3001 Leuven, BELGIUM Fax +32 16 397.552 *********************************************************************** * I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, ^^, * * quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, ~., * * stop, end, ^]c, +++ ATH, disconnect, halt, abort, hangup, KJOB, * * ^X^X, :D::D, kill -9 1, kill -1 $$, shutdown, init 0, Alt-F4, * * Alt-f-e, Ctrl-Alt-Del, Alt-SysRq-reisub, Stop-A, AltGr-NumLock, ... * * ... "Are you sure?" ... YES ... Phew ... I'm out * ***********************************************************************