[13442] in Athena Bugs
decmips 7.7M: diff
daemon@ATHENA.MIT.EDU (mhpower@MIT.EDU)
Tue Apr 25 04:45:05 1995
From: mhpower@MIT.EDU
To: bugs@MIT.EDU
Date: Tue, 25 Apr 95 04:44:53 EDT
diff reports no differences, and exits with status 0, if two files
differ only in characters that occur after the last newline, e.g.,
% od -c test1
0000000 t e s t \n
0000005
% od -c test2
0000000 t e s t \n t e s t
0000011
% ls -l test1 test2
-rw-r--r-- 1 mhpower 5 Apr 25 04:28 test1
-rw-r--r-- 1 mhpower 9 Apr 25 04:29 test2
% diff test1 test2
% echo $status
0
% diff -c test1 test2
No differences encountered
% echo $status
0
% cmp -l test1 test2
cmp: EOF on test1
% echo $status
1
% /mit/gnu/decmipsbin/gdiff test1 test2
1a2
> test
\ No newline at end of file
% echo $status
1
The behavior of ignoring differences following the last newline isn't
documented in the diff man page.
Matt