www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/19/10:16:37

From: mdruiter AT cs DOT vu DOT nl (Ruiter de M)
Newsgroups: comp.os.msdos.djgpp
Subject: Bug in DJGPP port of diff?
Date: 19 Jun 1998 13:57:07 GMT
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Lines: 28
Message-ID: <6mdqnj$s18$1@star.cs.vu.nl>
NNTP-Posting-Host: sloep10.cs.vu.nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I have noticed that the DJGPP-port of GNU diff behaves very strange
when files with/without CR's are used:

bash$ printf "abc\n" > file1
bash$ od -t x1 file1
0000000 61 62 63 0d 0a
0000005
bash$ printf "abc\r\n" > file2
bash$ od -t x1 file2
0000000 61 62 63 0d 0d 0a
0000006
bash$ diff file1 file2
bash$ diff -q file1 file2
Files file1 and file2 differ
bash$ diff -s file1 file2
Files file1 and file2 are identical

Especially the last lines are very entertaining: identical files
differ! I could understand both answers, but not both at once.

Is this a bug or have I missed some documentation?

Hope this helps.
-- 
Groeten, Michel.        http://www.cs.vu.nl/~mdruiter
  ____________
  \  /====\  /          "You know, Beavis, you need things that suck,
   \/      \/           to have things that are cool", Butt-Head.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019