Mail Archives: djgpp/1999/06/09/12:56:53
Message-Id: | <199906091612.LAA13076@darwin.sfbr.org>
|
Date: | Wed, 9 Jun 1999 11:12:49 -0500 (CDT)
|
From: | Jeff Williams <jeffw AT darwin DOT sfbr DOT org>
|
Subject: | output from diff --binary
|
To: | djgpp AT delorie DOT com
|
MIME-Version: | 1.0
|
X-Mailer: | dtmail 1.2.0 CDE Version 1.2 SunOS 5.6 sun4m sparc
|
X-MIME-Autoconverted: | from QUOTED-PRINTABLE to 8bit by delorie.com id MAA01302
|
Reply-To: | djgpp AT delorie DOT com
|
Appended is a short script to be run under bash 1.14.7, and a
corresponding batch file for native DOS, illustrating a strange
output glitch in diff (GNU diffutils 2.7.1). These scripts reliably
produce the expected behavior on my system (386/387; djgpp v2.02;
DOS 5.0). It seems that the output produced by the `--binary' switch
lacks a terminal \n. Can others confirm this behavior? (Interestingly,
I do not see the problem if I redirect the output from the scripts.)
TIA,
jtw
------
#!/bin/sh
echo "Test file 1" > foo
echo "Test file 2" > bar
diff --version
# case foo!=bar
diff -qs foo bar
diff -qs -a foo bar
diff -qs --text foo bar
diff -qs --binary foo bar
diff -qs --binary foo bar
# case foo==bar
cp -f foo bar
diff -qs foo bar
diff -qs -a foo bar
diff -qs --text foo bar
diff -qs --binary foo bar
diff -qs --binary foo bar
rm -f foo bar
------
@echo off
echo "Test file 1" > foo
echo "Test file 2" > bar
diff --version
REM case foo!=bar
diff -qs foo bar
diff -qs -a foo bar
diff -qs --text foo bar
diff -qs --binary foo bar
diff -qs --binary foo bar
REM case foo==bar
cp -f foo bar
diff -qs foo bar
diff -qs -a foo bar
diff -qs --text foo bar
diff -qs --binary foo bar
diff -qs --binary foo bar
rm -f foo bar
- Raw text -