From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37235 invoked by alias); 14 May 2015 19:53:42 -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 37224 invoked by uid 89); 14 May 2015 19:53:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 14 May 2015 19:53:41 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4EJrdX5019214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 14 May 2015 15:53:39 -0400 Received: from [10.3.113.69] (ovpn-113-69.phx2.redhat.com [10.3.113.69]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4EJrcJQ012647 for ; Thu, 14 May 2015 15:53:38 -0400 Message-ID: <5554FD42.1060406@redhat.com> Date: Thu, 14 May 2015 20:00:00 -0000 From: Eric Blake User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: [Bug] bash' read builtin command behaves differently on '\r' (4.3.33) References: <20150514223211.790926b378d251d4b25dc82b@nm.ru> In-Reply-To: <20150514223211.790926b378d251d4b25dc82b@nm.ru> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="shaEPVWdRHIIO7H1U8jOlSupT4PJ69XwM" X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00166.txt.bz2 --shaEPVWdRHIIO7H1U8jOlSupT4PJ69XwM Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 736 On 05/14/2015 01:32 PM, Mikhail Usenko wrote: >=20 > Cygwin version: 2.0.2-1 >=20 > [linux]$ bash --version > GNU bash, version 4.3.33(1)-release (i686-redhat-linux-gnu) > [cygwin]$ bash --version > GNU bash, version 4.3.33(1)-release (x86_64-unknown-cygwin) >=20 > Testcase: > [linux]$ echo -ne "\r\n" | { read t; echo "$t"; } | od -A n -t x1 echo -n is not portable; use printf instead: printf %s '\r\n' or with a bash-ism: printf $'\r\n' > 0d 0a > [cygwin]$ echo -ne "\r\n" | { read t; echo "$t"; } | od -A n -t x1 > 0a Umm, are you sure you haven't turned on the igncr shell option in your cygwin environment? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --shaEPVWdRHIIO7H1U8jOlSupT4PJ69XwM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 604 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVVP1CAAoJEKeha0olJ0NqRYoH/RBfKoQbM1LdSb7Vmp2QjkPr 5uYlPa3UWUxkRrxjGTwPifJ2gdjVHZxj9rOEcNAix6Sz/9tA3qDFHphjRNaEbzFm 2OHULti4I598y3H8WBLPQf7ULkJcw7bvGYdCK5OloDiV9prLst4yOv60NclE4kNe LZqDjhqldrgTlgFW5oNSkNIQLqpSim4zyyETSwD2FkDp9TCHiIlL8MiNOACdqLJq FKKcVNYkPyzsXutvIVl5/LPZkMXLftSmaV7Lu+Qo+8WLJi2ScdvcehO4gtycoyWr kcp3gcLywpF/+cbIGfBTImt+uH0BkT5bnyEs+owIQgRyiFY7JrnNm8LWUw25c3M= =prOc -----END PGP SIGNATURE----- --shaEPVWdRHIIO7H1U8jOlSupT4PJ69XwM--