X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4D7A43D0.30807@redhat.com> Date: Fri, 11 Mar 2011 08:46:24 -0700 From: Eric Blake User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: 'tr' Bug References: <4D7A3FB8 DOT 3050004 AT tundraware DOT com> <4D7A4216 DOT 6010207 AT redhat DOT com> <4D7A434A DOT 3030109 AT tundraware DOT com> In-Reply-To: <4D7A434A.3030109@tundraware.com> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigB9F71328800C4A0EF0DF0279" X-IsSubscribed: yes 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 --------------enigB9F71328800C4A0EF0DF0279 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/11/2011 08:44 AM, Tim Daneliuk wrote: > On 3/11/2011 9:39 AM, Eric Blake said this: >> On 03/11/2011 08:28 AM, Tim Daneliuk wrote: >>> echo /opt/IBN/df | tr [A-Z] [a-z] >>> >>> produces: >>> >>> /opt/xxx/df >> >> Let me guess - you have a file named 'x' in the current directory. >> >> Quote your arguments, so that the shell won't glob them: >> >> echo /opt/IBN/df | tr '[A-Z]' '[a-z]' >> >> This is not cygwin-specific. >> >=20 > OK, then why the "correct" behavior on FreeBSD 8.2 and RHEL 5.5, > both running bash I wonder ... Because you didn't have a one-letter file in the current directory to provoke glob expansion, and when a glob doesn't match, it is passed through unchanged to tr. To reproduce on FreeBSD or RHEL, simply 'touch x' then try again :) --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigB9F71328800C4A0EF0DF0279 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJNekPQAAoJEKeha0olJ0Nq1FoH/AtqyN5wFx4DiBh7QjGVnIzm a9JniWuvQjGifryz1quT0Tg7uo2uH+lWYoUoj3vd8AIHh4dxdkDTKYvhZuRgVvaR yPururCzNYIe7WvhA5lV7N9rGTwY+YdF6pOYWoeFM9AuxzSNPuQ9e114D5652SEV j50QPepLULvzgWKpVq5WMnP7veiyw7LZ3nc0RJyMxHrvXbxGTWqKMrkqeZLssnbJ go355NAE9bKp/sylNN34dTtLuIJgKqlpPw9kr+jSAzd9yu4NByJK3Lqhxz6az52X llSBxJs7kJN+O5AyAA4Qx27XqiubTB8JsY0GkknjyhFBwElO+Jo/4LdXWLlQ/rg= =E/mS -----END PGP SIGNATURE----- --------------enigB9F71328800C4A0EF0DF0279--