Re: Extra CR symbol from backticks on Cygwin 2.9.0
- Date: Tue, 12 Sep 2017 09:03:09 -0400
- From: cyg Simple <cygsimple@xxxxxxxxx>
- Subject: Re: Extra CR symbol from backticks on Cygwin 2.9.0
On 9/12/2017 1:38 AM, Nikolay Melekhin wrote:
> Hi Eric,
> Thanks! This option is what I am looking for.
> However I cannot agree with you on bash behavior in Cygwin. Section of
> command substitution in bash documentation says:
> "...with any trailing newlines deleted." That is why I expected that
In POSIX and newline is simply a LF. The fact that your input from a
Windows cmd.exe contains CR has no bearing on POSIX.
> bash should remove trailing newlines in command substitution results,
> which are CRLF on Windows.
If bash were to follow Windows semantics instead of POSIX then your
point would be valid. However Cygwin is a POSIX emulation so your point
in this case is false.
> From my point of view, bash in Cygwin should follow the same rule on
> Linux and Windows: remove trailing newlines in command substitution.
> So remove trailing CRLF on Windows.
Since Linux and Cygwin are both POSIX then Cygwin is doing what Linux
does. You just need to adjust the differences by properly filtering
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple