Hi,
I need to get only different rows from comparing two files , i donot need the place of row or any other error comments , just my data , Can anyone help me please?
example:
$Diff -b reham.txt reham1.txt
7a8(DON'T NEED IT)
> hany 4/4/1989 $100,000
\ No newline at end of file(DON'T NEED IT)
I only need row of hany .
If you are prepared to sort both files first, take a look at the unix "comm" command.
The "diff" command is unsuitable if you only need the differences because it shows the difference in context and therefore includes lines which are not different.
sort reham.txt > /tmp/reham.sor
sort reham1.txt > /tmp/reham1.sor
# Records in reham.sor but not in reham1.sor
comm -23 reham.sor reham1.sor
# Records in reham1.sor but not in reham.sor
comm -13 reham.sor reham1.sor
when result appear all rows appear together, but what i need to make rows of first file be in a file , and rows from second file in another file
---------- Post updated at 08:20 AM ---------- Previous update was at 07:24 AM ----------
Hi,all
I made another program , but i have a problem on it to .
Can you please tell me how can i ignore special characters (space, comma , black blank) in my comparison between two files my code is :