X-Recipient: archive-cygwin AT delorie DOT 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; q=dns; s=default; b=nLfLX8 KRmkDPMvdPOFQa1P5g5ukng3r3TLm/R9KHeP8LI973fW4TCDRvRxzGeQppZ+pLfM QENYCvJtcsXAvjN002t62hmSho7BCRVGHTUcjhOrU+PPB0v1OJc3DCZ7UY4UCL09 zhimg+qSySRPt8hUdlOZ1txKZATEoI3SInrbU= 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; s=default; bh=Pg1O63+U0Wgh OPQLwxgDlZc8VA8=; b=MSgT3XJhd/YoD9A6FS/HPrNLsZP42H4SfDjI6/7AvwHp Ex5cQ9RdUB3AMWsdp327pl7UoXsuBX9oW6+xSgHIY3ZaZ/Oq/gDZBDMNVpXN549k pOUergAg0xmoNoTicgJauqD5tKjouN0KAwgze6vhU+m1gcWDmC5w1hWGO3RSYEk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Message-ID: <5554FD42.1060406@redhat.com> Date: Thu, 14 May 2015 13:53:38 -0600 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 AT cygwin DOT com Subject: Re: [Bug] bash' read builtin command behaves differently on '\r' (4.3.33) References: <20150514223211 DOT 790926b378d251d4b25dc82b AT nm DOT 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 --shaEPVWdRHIIO7H1U8jOlSupT4PJ69XwM Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" -----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--