X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:from:date:message-id:subject:to
	:content-type; q=dns; s=default; b=bi56t3CVSSodRqFoGx6B8jIzXkcQm
	vLO+deapo753P/omjL8JuL48oBBXxsRpt1qPKPjeE0Zpy+mOuUmnX1XzeN0jXnGy
	bUBO+ax87d+QNWbHw02hcCEMKOv8l2idE1HRPcQ1v+irI47Upz43zEFUcL25no91
	rTqGodQH70T8R0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:from:date:message-id:subject:to
	:content-type; s=default; bh=h69cPhTgrBblIEmq39kHBvnGcQM=; b=Ejj
	YVlmXuhyP4wWdXDdGC3AZ0ifeEbA+Tln0J7yg0/fNPjwjGFtKtqLgmvGBsZxeY+6
	G2dk9nsD4uEFrM0vPiO4AZ9eglbmSaXWL0ATE0ZkSGsnXlPf0qu3b9Pe39jWYGMZ
	mTIVz8ZkhyTkDPw8kOeGn0HUfV+iUsn2+wp/1Nik=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=crs
X-HELO: mail-qk0-f193.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20161025;        h=x-gm-message-state:mime-version:from:date:message-id:subject:to;        bh=4T6+cWN5g5BFlk0bEgtyOD26kn31UbmyJvrE0OVrE1U=;        b=rsKNI/NfarRVj0TeEGcavHuVN4m0SFLh59IOGc1XYz566Ha06uYciraK9JY9kN1J38         NLy0tcMnlQO0x6OyR03pvWZLcT5LS2MeVai++Toq9KS+6MhkeAYo1ABYx2vzq7l1OV6C         v6b6u21oX7OMcklnQ199/LGtDycj8GJ6ta3+Pv8CgpgdPWGl9/1N8TURvTtI8OsIUcZn         ohj28ho1xm7chNu6vmLNx1PIPfGaa+8m5g75M/sh9aW7CZGs7D80XLjpK865z8AtACHo         a/3Py1OM/mIO0nR3r8QxzjOaB4mK69prBLoMU5NLtQsTeXTCRQgIkQgu2V2ukpjvVvYc         DaLw==
X-Gm-Message-State: AHPjjUhw58KBaGs27O+zxnNen3cyUh/k5tkMai58dUID4uWHZlDE0+Sc	UVwUeIKNUPoX41cPWMefXZPc0TlShHSv
X-Google-Smtp-Source: AOwi7QDjVR07hHX3jf4diP3zH6o/aQEj43MRGpyp5JHYX3GjiOo9SkgT0BnJBXnayAPmGWplO2oKAAT8mmdeT7IvtZE=
X-Received: by 10.55.97.68 with SMTP id v65mr17737456qkb.124.1505165249338; Mon, 11 Sep 2017 14:27:29 -0700 (PDT)
MIME-Version: 1.0
From: Nikolay Melekhin <nikolay.melekhin@gmail.com>
Date: Tue, 12 Sep 2017 00:27:28 +0300
Message-ID: <CAAq9174Ffd-zFLrCsUSz5DcxW8DYaeQbxsPxWMH0bh0vPBJCLA@mail.gmail.com>
Subject: Extra CR symbol from backticks on Cygwin 2.9.0
To: cygwin@cygwin.com
Content-Type: text/plain; charset="UTF-8"

Command line utilities in Windows add CRLF as new line symbol in an output.

For example:

echo "Windows"
TEST=`cmd /c "echo Win"`
echo " ${TEST} " | od -t x1
echo "CYGWIN"
TEST=`echo Win`
echo " ${TEST} " | od -t x1

Output:

Windows
0000000 20 57 69 6e 0d 20 0a
0000007
CYGWIN
0000000 20 57 69 6e 20 0a
0000006

I'd expect that Cygwin must remove CRLF symbols from backtick results,
but remove only LF symbol. It gets different results on Windows and
Linux. Result on Windows has additional CR symbol and for example
string comparision, which is working in Linux, fails in Windows.

Is any kind of an option/setting which removes such CRs or it is a bug
in Cygwin?


Best regards,
Nikolay Melekhin

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

