[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cygwin
Subject:    A simple characterization of the CR/LF bug in bash.exe
From:       Hubert Garavel <Hubert.Garavel () inrialpes ! fr>
Date:       2000-09-29 20:36:59
[Download RAW message or body]


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@sourceware.cygnus.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic