Roy dixit: > MSYS environment, program will return string in CRLF line ending > usually (even MinGW GCC returns so), without this patch, 0x0D will be
Right. Your patch however breaks binary-cleanliness, and mksh is primarily a shell for operating environments that are BSD-ish enough to support it, so this is nothing that will be changed in mksh. If you script on/for MSYS, you either must set its stdin/stdout/stderr to binary mode (in the callees - mksh uses Unix I/O instead of stdio and such is not affected) or deal with this in your shell scripts, e.g. x=$(foo | sed 's/\r$//') using a binary-safe sed. bye, //mirabilos -- [...] if maybe ext3fs wasn't a better pick, or jfs, or maybe reiserfs, oh but what about xfs, and if only i had waited until reiser4 was ready... in the be- ginning, there was ffs, and in the middle, there was ffs, and at the end, there was still ffs, and the sys admins knew it was good. :) -- Ted Unangst über *fs
