Re: Inquiry:How to compare two files but not in line-by-line basis?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



From: hadi motamedi <motamedi24@xxxxxxxxx>
>Sorry . I tried for "#diff -y" but its output seems to have a comparison between the two files in line-by-line basis . As you mentioned , if the row#1 in file1 is in match with say row#5 in file2 I want it not to be considered as a difference. But the the output shows it as if it is being considered as a difference. Please correct me .

Could you be more precise when you say "compare"...?
By example, to get matching lines, you could:

  cat $FILE1 $FILE2 | sort | uniq -c | ...

You'd get each line preceded by the number of occurence; then grep what you want...

JD


      
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux