From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8413 invoked by alias); 11 Sep 2017 21:36:05 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 8403 invoked by uid 89); 11 Sep 2017 21:36:04 -0000 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 Received: from mail-qk0-f193.google.com (HELO mail-qk0-f193.google.com) (209.85.220.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Sep 2017 21:36:03 +0000 Received: by mail-qk0-f193.google.com with SMTP id g128so6202256qke.0 for ; Mon, 11 Sep 2017 14:36:03 -0700 (PDT) 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 Received: by 10.140.98.241 with HTTP; Mon, 11 Sep 2017 14:27:28 -0700 (PDT) From: Nikolay Melekhin Date: Mon, 11 Sep 2017 21:36:00 -0000 Message-ID: Subject: Extra CR symbol from backticks on Cygwin 2.9.0 To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-09/txt/msg00130.txt.bz2 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