delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/29/16:38:16

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 29 Sep 2000 22:36:59 +0200 (MET DST)
From: Hubert Garavel <Hubert DOT Garavel AT inrialpes DOT fr>
Message-Id: <200009292036.WAA14465@noisetier.inrialpes.fr>
X-Mailer: Mail User's Shell (7.2.5 10/14/92)
To: cygwin AT sourceware DOT cygnus DOT com
Subject: A simple characterization of the CR/LF bug in bash.exe

Synopsis
--------

	The backtick bug in bash (i.e., bash forgets to strip
	\r when evaluating a shell command within `...`)
	has already been reported.

	We give here a small shell-script named "backtick"
	that illustrates this bug, exhibiting an incompatibility
	between /bin/sh.exe and /bin/bash.exe.

	Typing
		/bin/sh backtick
	produces
		0

	Typing
		/bin/bash backtick
	produces
		1

Shell-script "backtick"
-----------------------



# create a program that prints "Hello" and compile it 
# with -mno-cygwin to obtain a "standard" Win32 application

cat > bashtest.c << EOF
main ()
{
printf ("Hello\n");
exit (0);
}
EOF

gcc -mno-cygwin bashtest.c -o bashtest.exe

/bin/test "`./bashtest`" = "Hello"
echo $?




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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