comparing 2 files

I have 2 files
diff.txt
0x21
0xc0a80129
0xc0a80101
0xc0a80108

and abc.txt
0x21
0xc0a80101
0xc0a80108
0xc0a80129
I want to compare these 2 files.
The code that I have so far is

counter=1
exec 4< diff.txt
while read -u4 line
do
grep "$line" abc.txt 1>/dev/null
if [[ $? -eq 1 ]]
then
echo "Line $counter is not in the abc.txt file!!!" | tee $var.txt
fi
(( counter += 1 ))
done

even when te 2 files are similar the output that I get iss
Line 4 is not in the abc.txt file!!!

what could I be doing wrong

IS there a reason not to use the diff command?

diff file1 file2

yes there is ..the file contents are not always in the same order. if i run a diff on these 2 files the output is
2d1
< 0xc0a80129
4a4
> 0xc0a80129

maybe compare was a wrong word..i want to match the contents of these 2 files no matter in which order they are

If you use the Forums' "Search' capability, it should give you plenty of similar threads.

i have the code i just can't figure out whats wrong with it

strange - works just fine here.
Another alternative would be:

nawk 'FNR==NR{a[$0]++} !a[$0]' diff.txt abs.txt

i think a simple solution would be to sort both the files and then use the comm utility.

comm  -12 <(sort diff.txt) <(sort abc.txt)