Cygwin 1.7 - backquoting, carriage returns and the removal of binmode

Thomas Wolff towo@towo.net
Fri Dec 18 07:01:00 GMT 2009


Ryan Dortmans schrieb:
> Hi,
>
> I have been having issues with backquoting DOS (text mode) programs in
> Cygwin 1.7. For example, for the following command:
>
> echo `example-prog` aaa
>
> I would expect output to be:
>
> hello world aaa
>
> However, the carriage return is being including in the output, resulting in:
>
> aaalo world
>
> This issue has been raised before in the mailing lists, with the
> solution being to set the CYGWIN environment variable to include
> "nobinmode". This option has been removed in 1.7. ...
It might be a good idea to remove the final CRLF for command line output 
embedding even without the igncr option as this context is a somewhat 
special case.
Removing the final LF (standard shell behavior) isn't binary-transparent 
either - it's a convenience function.

Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list