logo       

Re: RE: Bug with backticks behaviour in mSYS?: msg#00004

gnu.mingw.msys

Subject: Re: RE: Bug with backticks behaviour in mSYS?

Quoting Mark Cave-Ayland
<m.cave-ayland-IbN7e4zYhAu9FHfhHBbuYA@xxxxxxxxxxxxxxxx>:

Hi everyone,

Another update on this: it appears to a be a bug in the MingW build of
sh.exe, and seems to happen if the last character from the backticked
command is a newline (\n) and there are additional characters after the echo
command and the enclosing quotes. However, it does appear that the MingW
version of bash doesn't have this bug so I guess this will have to be the
short term work-around. Here are the outputs from MingW 4.1.0 and FC4 for
the same test given in the previous email using both sh and bash:


Is your test program compiled with binary mode defaults for stdout? Try adding
/mingw/lib/binmode.o to the link command and retry your test. This is likely
not to be a MinGW/MSYS error but a Windows feature.


FC4
---

[mca198@p15195424 test]$ sh -c "echo \"\`./test\` -lpq\"" | hexdump -C
00000000 74 68 69 73 20 69 73 20 61 20 74 65 73 74 20 73 |this is a test
s|
00000010 74 72 69 6e 67 20 2d 6c 70 71 0a |tring -lpq.|
0000001b
[mca198@p15195424 test]$ bash -c "echo \"\`./test\` -lpq\"" | hexdump -C
00000000 74 68 69 73 20 69 73 20 61 20 74 65 73 74 20 73 |this is a test
s|
00000010 74 72 69 6e 67 20 2d 6c 70 71 0a |tring -lpq.|
0000001b


MingW/MSYS
----------

mca@IBM-SPARKS ~
$ sh -c "echo \"\`./test\` -lpq\"" | hexdump -C
00000000: 74 68 69 73 20 69 73 20 61 20 74 65 73 74 20 73 this is a test s
00000010: 74 72 69 6E 67 01 20 2D 6C 70 71 0A tring. -lpq.

mca@IBM-SPARKS ~
$ bash -c "echo \"\`./test\` -lpq\"" | hexdump -C
00000000: 74 68 69 73 20 69 73 20 61 20 74 65 73 74 20 73 this is a test s
00000010: 74 72 69 6E 67 20 2D 6C 70 71 0A tring -lpq.


Where is the best place to report this bug so that it can get resolved for
future releases?


The SF project provides a bug tracker for the MinGW project, that is where we
store the bug reports.

Earnie



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise