logo       

RE: Bug with backticks behaviour in mSYS?: msg#00003

gnu.mingw.msys

Subject: RE: Bug with backticks behaviour in mSYS?

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:


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?


Many thanks,

Mark.

------------------------
WebBased Ltd
17 Research Way
Plymouth
PL6 8BT

T: +44 (0)1752 797131
F: +44 (0)1752 791023

http://www.webbased.co.uk
http://www.infomapper.com
http://www.swtc.co.uk

This email and any attachments are confidential to the intended recipient
and may also be privileged. If you are not the intended recipient please
delete it from your system and notify the sender. You should not copy it or
use it for any purpose nor disclose or distribute its contents to any other
person.




-------------------------------------------------------
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