From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 27 11:48:22 2014 Received: (at submit) by debbugs.gnu.org; 27 Mar 2014 15:48:22 +0000 Received: from localhost ([127.0.0.1]:52928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTCXU-00022m-OA for submit@debbugs.gnu.org; Thu, 27 Mar 2014 11:48:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55383) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WT6ql-0007CC-PL for submit@debbugs.gnu.org; Thu, 27 Mar 2014 05:43:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WT6qd-0004wo-3T for submit@debbugs.gnu.org; Thu, 27 Mar 2014 05:43:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT6qd-0004wj-0t for submit@debbugs.gnu.org; Thu, 27 Mar 2014 05:43:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT6qW-00062a-NO for bug-coreutils@gnu.org; Thu, 27 Mar 2014 05:43:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WT6qQ-0004tq-OZ for bug-coreutils@gnu.org; Thu, 27 Mar 2014 05:43:36 -0400 Received: from mail-ig0-f170.google.com ([209.85.213.170]:33545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT6qQ-0004tc-KF for bug-coreutils@gnu.org; Thu, 27 Mar 2014 05:43:30 -0400 Received: by mail-ig0-f170.google.com with SMTP id uq10so1259394igb.3 for ; Thu, 27 Mar 2014 02:43:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=5/W6wgMFsPUe6YwuNAJbGkHg2jGMotYjM+ztFgd9Nwo=; b=HkXaHG1bV6JoCFTAhO8pkOQPyVtyWgamYHXDVTP6WF7bp2M72ZbKy+h5Ml4q3Hduoo SfQwk+FIgbFQvvgomqs0eJaTVg5SRXQLaQwKjmZYMqj6glQb2Qk4ZTW5HIeiqu1aCDyQ wWN8zd++7EQQBvT49QNQBOGI2k4xIIR/i9tkV3QjZ2GjzJB5zpSYApxxzk0Lp3z4/tlr V4PAJVC24RlGpvLWAEUow8mZUngc+xro8Fex3+P1bgG4EEgK93MIRb9j1HR+eVDCxxLA bBWfb4B+t++Vb8bzgSBJobsEOr3wIQLqU11cFg0oxfF8EDnuBgdQhiRIQoJAYqv8EEYC UtQw== X-Gm-Message-State: ALoCoQnr8iN91WVagsmzugfOJlthCU3z0RpuuPfXCY5TmIucFgHSHxRcLxFdL/1Ufj7lkfJEOdZp MIME-Version: 1.0 X-Received: by 10.42.41.212 with SMTP id q20mr774247ice.80.1395913409178; Thu, 27 Mar 2014 02:43:29 -0700 (PDT) Received: by 10.64.81.74 with HTTP; Thu, 27 Mar 2014 02:43:29 -0700 (PDT) Date: Thu, 27 Mar 2014 10:43:29 +0100 Message-ID: Subject: tr result is different when executed in /usr/bin From: =?ISO-8859-1?Q?Beno=EEt_DUNAND=2DLAISIN?= To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary=20cf301d3d7ee443cb04f5936a25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 27 Mar 2014 11:48:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --20cf301d3d7ee443cb04f5936a25 Content-Type: text/plain; charset=ISO-8859-1 Problem discovered in tr (GNU coreutils) 8.13 on a Ubuntu 12.04. Running those commands: cd $HOME echo "Linux" | tr [:upper:] [:lower:] will result: linux Running the same from /usr/bin: cd /usr/bin echo "Linux" | tr [:upper:] [:lower:] will result: winux which is obviously a bad answer. In debug mode: sh -xc "echo "Linux" | tr [:upper:] [:lower:]" + echo Linux + tr [:upper:] w winux Regards. --20cf301d3d7ee443cb04f5936a25 Content-Type: text/html; charset=ISO-8859-1
Problem discovered in tr (GNU coreutils) 8.13 on a Ubuntu 12.04.

Running those commands:

cd $HOME
echo "Linux" | tr [:upper:] [:lower:]

will result: linux

Running the same from /usr/bin:

cd /usr/bin
echo "Linux" | tr [:upper:] [:lower:]

will result: winux
which is obviously a bad answer.

In debug mode:

sh -xc "echo "Linux" | tr [:upper:] [:lower:]"
+ echo Linux
+ tr [:upper:] w
winux

Regards.
--20cf301d3d7ee443cb04f5936a25-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 27 12:06:50 2014 Received: (at control) by debbugs.gnu.org; 27 Mar 2014 16:06:50 +0000 Received: from localhost ([127.0.0.1]:52944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTCpN-0002a8-Lj for submit@debbugs.gnu.org; Thu, 27 Mar 2014 12:06:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32917) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTCpI-0002Zo-R2; Thu, 27 Mar 2014 12:06:46 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2RG6hZ1012055 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Mar 2014 12:06:43 -0400 Received: from [10.3.113.66] (ovpn-113-66.phx2.redhat.com [10.3.113.66]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2RG6gGc000600; Thu, 27 Mar 2014 12:06:42 -0400 Message-ID: <53344C91.1020701@redhat.com> Date: Thu, 27 Mar 2014 10:06:41 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: =?UTF-8?B?QmVub8OudCBEVU5BTkQtTEFJU0lO?= , 17121-done@debbugs.gnu.org Subject: Re: bug#17121: tr result is different when executed in /usr/bin References: In-Reply-To: X-Enigmail-Version: 1.6 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e3rWbVpXp3gijoX9j9T1BXGotm0TjcbDc" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --e3rWbVpXp3gijoX9j9T1BXGotm0TjcbDc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tag 17121 notabug thanks On 03/27/2014 03:43 AM, Beno=C3=AEt DUNAND-LAISIN wrote: > Problem discovered in tr (GNU coreutils) 8.13 on a Ubuntu 12.04. >=20 > Running those commands: >=20 > cd $HOME > echo "Linux" | tr [:upper:] [:lower:] Underquoted. Run: echo [:upper:] [:lower:] and then echo "[:upper:]" "[:lower:]" in the two directories to spot the difference. (Hint - in one of your two directories, a shell glob is matching a one-byte file name) As this is user error and not a bug in tr, I'm marking this bug as closed, but feel free to add more comments if you still need help understanding the issue. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --e3rWbVpXp3gijoX9j9T1BXGotm0TjcbDc 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTNEyRAAoJEKeha0olJ0NqHysH/0oL5lOdq5jswSdLES5SwFlp GMiE1KVRFY5tyzW38LiCj3xIl54s4IQC05JLcKXvBumRnIBxKXTddKkY13stq2Q9 y89H7XeLWQtYK5fYXyDmfSlWK7BjTUzLT9ZV37jq2DbOFUlpMOh7WgmDNbNKgJ2L LWcHRCs/jPHHwnL9h9oJDYBAHebyK1AKG9aaRDWJK0oKwQuSuOHg2trlSxsqSBDm Y0e7IV4Qg6LxBzdR9l9g4NMEfgATWEbzosprDKIlRE8zam/1k5QBic7Ez+teoXFy H/8kH2l3emswGkZQil4akXHv7RHRgidd3uzw48bedVvePKTlPik4ahIQgl08YkM= =3WVi -----END PGP SIGNATURE----- --e3rWbVpXp3gijoX9j9T1BXGotm0TjcbDc-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 27 12:46:40 2014 Received: (at 17121) by debbugs.gnu.org; 27 Mar 2014 16:46:40 +0000 Received: from localhost ([127.0.0.1]:52997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTDRw-0004uq-1q for submit@debbugs.gnu.org; Thu, 27 Mar 2014 12:46:40 -0400 Received: from moutng.kundenserver.de ([212.227.126.131]:59932) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTDRn-0004uT-Tm for 17121@debbugs.gnu.org; Thu, 27 Mar 2014 12:46:32 -0400 Received: from susi.site (gw.camline.com [62.153.148.194]) by mrelayeu.kundenserver.de (node=mreue001) with ESMTP (Nemesis) id 0MUxAq-1WYfTY1bnI-00YD5S; Thu, 27 Mar 2014 17:46:25 +0100 Message-ID: <533455DF.4000008@bernhard-voelker.de> Date: Thu, 27 Mar 2014 17:46:23 +0100 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: 17121@debbugs.gnu.org, eblake@redhat.com, benoit.dunand-laisin@prologism.fr Subject: Re: bug#17121: tr result is different when executed in /usr/bin References: <53344C91.1020701@redhat.com> In-Reply-To: <53344C91.1020701@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:T+LiaTu8JUzJokPSx1bNpH+woSyDkPlH6GQsU3MmhHZ amvCK6Z1zIvIuYDr6xLA4IbYIPg5o4njKEF8iZ7SLHiE3xtya6 0H09QBxKiZhJ15jPivR2kJTegdZ9c6beXcxJBYxKSkbN+NDRtD 2q3j9DaQvySK+KVS7MgvzKY2BdgEFcwAGzi8dPIn4Eth9gZCXT tSeQBhbGdiO2OmRwmvmlrkU4ZyW091ZkVK+YfEc3+nJREU5+19 +8rppGxDGykyaxrTzrNYb62QxufhUczJ9U+nwGg7kSGLgybGw1 9GJSI+xPtWcuycGQfV5dqxzE7mZiJrrnxgU3cOYHjy1pTLy/EV muVIOBUkvAlgrXbIKirGaed5o96bYOEW0+4WTiVfk X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 17121 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 03/27/2014 05:06 PM, Eric Blake wrote: >> echo "Linux" | tr [:upper:] [:lower:] > > Underquoted. Run: > > echo [:upper:] [:lower:] > > and then > > echo "[:upper:]" "[:lower:]" > > in the two directories to spot the difference. (Hint - in one of your > two directories, a shell glob is matching a one-byte file name) FWIW: here, the 'w' program comes from the 'procps' package: $ ls -l /usr/bin/[:lower:] -rwxr-xr-x 1 root root 18896 Dec 17 16:58 /usr/bin/w $ /usr/bin/w --version w from procps-ng 3.3.8 Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 27 12:53:13 2014 Received: (at 17121) by debbugs.gnu.org; 27 Mar 2014 16:53:13 +0000 Received: from localhost ([127.0.0.1]:53011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTDYG-00056w-KF for submit@debbugs.gnu.org; Thu, 27 Mar 2014 12:53:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15437) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTDYC-00056a-Pu; Thu, 27 Mar 2014 12:53:09 -0400 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 s2RGr6bF018233 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Mar 2014 12:53:07 -0400 Received: from [10.36.116.70] (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2RG0TJY003040 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 27 Mar 2014 12:00:31 -0400 Message-ID: <53344B1D.9000600@draigBrady.com> Date: Thu, 27 Mar 2014 16:00:29 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Beno=EEt_DUNAND-LAISIN?= Subject: Re: bug#17121: tr result is different when executed in /usr/bin References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 17121 Cc: 17121@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) tag 17121 notabug close 17121 stop On 03/27/2014 09:43 AM, Benoît DUNAND-LAISIN wrote: > Problem discovered in tr (GNU coreutils) 8.13 on a Ubuntu 12.04. > > Running those commands: > > cd $HOME > echo "Linux" | tr [:upper:] [:lower:] > > will result: linux > > Running the same from /usr/bin: > > cd /usr/bin > echo "Linux" | tr [:upper:] [:lower:] > > will result: winux > which is obviously a bad answer. > > In debug mode: > > sh -xc "echo "Linux" | tr [:upper:] [:lower:]" > + echo Linux > + tr [:upper:] w > winux You debugged correctly but failed to see that tr was getting passed the wrong options. See 'w' above. That's because the shell is interpreting the [...] You need to quote it: $ echo 'Linux' | tr '[:upper:]' '[:lower:]' thanks, Pádraig. p.s. cd without the $HOME changes to the home directory From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 28 07:13:54 2014 Received: (at 17121) by debbugs.gnu.org; 28 Mar 2014 11:13:54 +0000 Received: from localhost ([127.0.0.1]:53972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTUjR-00080a-9C for submit@debbugs.gnu.org; Fri, 28 Mar 2014 07:13:53 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:63224) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTUjO-00080P-Mm for 17121@debbugs.gnu.org; Fri, 28 Mar 2014 07:13:51 -0400 Received: by mail-ig0-f174.google.com with SMTP id h18so667227igc.13 for <17121@debbugs.gnu.org>; Fri, 28 Mar 2014 04:13:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MrkjMFJmFr4XfTHl321Dff+OTPRTtcDClb85T3huRMQ=; b=DTY+hrqnzOEHE9gpYkxu66/KVrr9qeo8f29CBwOR/WkKjXuKtusz/ssgU1BYiyGYAr ZAkhYj6eYGo0Rsdny3vKdGgh/Y58JwzvTDWEz4i8DTfwMARuYmHJrDy0ZmfSa8WJJngd PBpMf8VE0NHDsuTeT2Tu5gVvOnMXn+YaW2Hom5q9YgcujZTo9xq2Vhb+pBrsv1GbYt0L 6z+Lr0pVuFU1Agm3/XkpRgzia9pVYTllsZdEFTAKNlJe6WN/egxEH6vuIEcMrTLF+hxv U231G+KA99bk5Awq6V3g2YP+s4Qbfojm7QKt1tpS2BPdRC6c3DkSZrOa/gKQKVMpk+69 XAxw== X-Gm-Message-State: ALoCoQkXHuKKz+OgAcXqaBvVQgcMW1mlMJdVb8deN0i9Y8S7zd3LUU9MbpBGVsV+D6lew6SKM3Te MIME-Version: 1.0 X-Received: by 10.50.148.99 with SMTP id tr3mr10140050igb.24.1396005228706; Fri, 28 Mar 2014 04:13:48 -0700 (PDT) Received: by 10.64.81.74 with HTTP; Fri, 28 Mar 2014 04:13:48 -0700 (PDT) In-Reply-To: <53344B1D.9000600@draigBrady.com> References: <53344B1D.9000600@draigBrady.com> Date: Fri, 28 Mar 2014 12:13:48 +0100 Message-ID: Subject: Re: bug#17121: tr result is different when executed in /usr/bin From: =?ISO-8859-1?Q?Beno=EEt_DUNAND=2DLAISIN?= To: =?ISO-8859-1?Q?P=E1draig_Brady?= , mail@bernhard-voelker.de, eblake@redhat.com Content-Type: multipart/alternative; boundary=001a1134bf46c40c1304f5a8cb58 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17121 Cc: 17121@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --001a1134bf46c40c1304f5a8cb58 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for your explanations. Regards, Benoit 2014-03-27 17:00 GMT+01:00 P=E1draig Brady : > tag 17121 notabug > close 17121 > stop > > On 03/27/2014 09:43 AM, Beno=EEt DUNAND-LAISIN wrote: > > Problem discovered in tr (GNU coreutils) 8.13 on a Ubuntu 12.04. > > > > Running those commands: > > > > cd $HOME > > echo "Linux" | tr [:upper:] [:lower:] > > > > will result: linux > > > > Running the same from /usr/bin: > > > > cd /usr/bin > > echo "Linux" | tr [:upper:] [:lower:] > > > > will result: winux > > which is obviously a bad answer. > > > > In debug mode: > > > > sh -xc "echo "Linux" | tr [:upper:] [:lower:]" > > + echo Linux > > + tr [:upper:] w > > winux > > You debugged correctly but failed to see that > tr was getting passed the wrong options. See 'w' above. > That's because the shell is interpreting the [...] > You need to quote it: > > $ echo 'Linux' | tr '[:upper:]' '[:lower:]' > > thanks, > P=E1draig. > > p.s. cd without the $HOME changes to the home directory > --001a1134bf46c40c1304f5a8cb58 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks for your explanations.

Regards,Benoit


2014-03-27 17:00 GMT+01:00 P=E1draig Brady <P@draigbrady.com>:
tag 17121 notabug
close 17121
stop

On 03/27/2014 09:43 AM, Beno=EEt DUNAND-LAISIN wrote:
> Problem discovered in tr (GNU coreutils) 8.13 on a Ubuntu 12.04.
>
> Running those commands:
>
> cd $HOME
> echo "Linux" | tr [:upper:] [:lower:]<= br> >
> will result: linux
>
> Running the same from /usr/bin:
>
> cd /usr/bin
> echo "Linux" | tr [:upper:] [:lower:]
>
> will result: winux
> which is obviously a bad answer.
>
> In debug mode:
>
> sh -xc "echo "Linux" | tr [:upper:] [:lower:]"
> + echo Linux
> + tr [:upper:] w
> winux

You debugged correctly but failed to see that
tr was getting passed the wrong options. See 'w' above.
That's because the shell is interpreting the [...]
You need to quote it:

$ echo 'Linux' | tr '[:upper:]' '[:lower:]'

thanks,
P=E1draig.

p.s. cd without the $HOME changes to the home directory

--001a1134bf46c40c1304f5a8cb58-- From unknown Sun Jun 22 11:39:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 25 Apr 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator