From unknown Sat Jun 21 02:59:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10394 <10394@debbugs.gnu.org> To: bug#10394 <10394@debbugs.gnu.org> Subject: Status: Bug in tr command Reply-To: bug#10394 <10394@debbugs.gnu.org> Date: Sat, 21 Jun 2025 09:59:15 +0000 retitle 10394 Bug in tr command reassign 10394 coreutils submitter 10394 Raj Kambli severity 10394 normal tag 10394 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 29 00:17:15 2011 Received: (at submit) by debbugs.gnu.org; 29 Dec 2011 05:17:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rg8MX-0004RQ-Pg for submit@debbugs.gnu.org; Thu, 29 Dec 2011 00:17:12 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rg5n9-0000nR-14 for submit@debbugs.gnu.org; Wed, 28 Dec 2011 21:32:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rg5kQ-0006PO-Cp for submit@debbugs.gnu.org; Wed, 28 Dec 2011 21:29:39 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:55812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg5kQ-0006PI-BI for submit@debbugs.gnu.org; Wed, 28 Dec 2011 21:29:38 -0500 Received: from eggs.gnu.org ([140.186.70.92]:42097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg5kP-0007g6-64 for bug-coreutils@gnu.org; Wed, 28 Dec 2011 21:29:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rg5kN-0006P3-Tx for bug-coreutils@gnu.org; Wed, 28 Dec 2011 21:29:37 -0500 Received: from nm11-vm0.bullet.mail.ne1.yahoo.com ([98.138.90.58]:39838) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Rg5kN-0006Ou-GQ for bug-coreutils@gnu.org; Wed, 28 Dec 2011 21:29:35 -0500 Received: from [98.138.90.52] by nm11.bullet.mail.ne1.yahoo.com with NNFMP; 29 Dec 2011 02:29:33 -0000 Received: from [98.138.89.197] by tm5.bullet.mail.ne1.yahoo.com with NNFMP; 29 Dec 2011 02:29:33 -0000 Received: from [127.0.0.1] by omp1055.mail.ne1.yahoo.com with NNFMP; 29 Dec 2011 02:29:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 920091.17720.bm@omp1055.mail.ne1.yahoo.com Received: (qmail 48803 invoked by uid 60001); 29 Dec 2011 02:29:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1325125773; bh=aLdYtYaCL4pSZ8g2W6m9Mb0qgjBrpjS57EhTXe8MIVI=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=uau+McHZ9qPSxyBKdoNqKS4ywEC0TX07nKqxxYjhOZ0ZFlrss7L8x57OFPzdVwQMwyC2RkgYIwlTYmRSIb/nLqsU3qljBdgkFeogxCZg6EaAKGbgbmzfMkfS9Hawpz+Hdgc9MIFghDBdQnN8CrA8CiskNeGCYlRc4fnWRNFtDeM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=x0KhVhJO9krTH1RKbWrf+bbhKZqPqkniu1+tx3/8w+YrfJJ3c0FjZ8PIZZ+dd6bemKPamk6O9cVLt3iKLCmkDrJ7YSQsV6Qv+ca32VDA2ykUNewPfr1Qha1Hhl1a9MLtTpdj1ay7xTtVoqoFf6HrXsndquYdSdbbk6egq0eo4Cg=; X-YMail-OSG: BR09_AcVM1kmooGgYZBBVrYdzMXA.RL8V6JFqnXjoRsoRyQ UwmmcD9a26VOIu4roodhsNLu91G1NLGUSpbjJZ_iy3B4iWOCMskrWlN7VDaw mJZmFaaC5KNFC9N6FK5i92ihCRLJxyfpCjo4MF9emMWGevXxBi.69xGcV3Y4 d8PqWwbcRS0OWiS7wud7gx5gMmX09Ir_oTuBUh8XqsnNriAmbWiUXi5wUBi3 _Bhb3U2nWJplITzaGhpif6v5B9vgAW9YL.3zRFJh6K6H.jJgwcX3dOkZ8vn5 c16njF6vFRATGOKD4_mqZ1cAUSCEdSDE29mjVvDKQjg2dP1cKnGvrdMS90Gy HD.FQoUvsVa8AmjG9P.x03fx9j2yPY93p3HldvophkvwvwutAtBlXRCoWM99 fMAUU.J4HTgfKgOQSijG4D7G07JTqSWbwsgcXQndKKs3_lWdDv37C2eAK7We TNj7o4b.xiDlUCyGgi3Tr4xvXvufh0zRN2PzQ4__.NEj9gQ-- Received: from [67.85.26.47] by web125603.mail.ne1.yahoo.com via HTTP; Wed, 28 Dec 2011 18:29:33 PST X-Mailer: YahooMailWebService/0.8.115.331698 Message-ID: <1325125773.12785.YahooMailNeo@web125603.mail.ne1.yahoo.com> Date: Wed, 28 Dec 2011 18:29:33 -0800 (PST) From: Raj Kambli Subject: Bug in tr command To: "bug-coreutils@gnu.org" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="933233344-18256676-1325125773=:12785" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 29 Dec 2011 00:17:03 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Raj Kambli List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) --933233344-18256676-1325125773=:12785 Content-Type: text/plain; charset=us-ascii Dear GNU, Not sure if this is bug. But I think first one is legal command that is logically similar to second which works Thank you, Raj. #1-- Error [raj@rajvista ~]$ echo "Raj" | tr "[[:alpha:]]" "[[:lower:]]" tr: misaligned [:upper:] and/or [:lower:] construct #2--Ok [raj@rajvista ~]$ echo "Raj" | tr "[[:upper:]]" "[[:lower:]]" raj [raj@rajvista ~]$ [raj@rajvista ~]$ tr --version tr (GNU coreutils) 6.12 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Jim Meyering. --933233344-18256676-1325125773=:12785 Content-Type: text/html; charset=us-ascii
Dear GNU,

Not sure if this is bug. But I think first one is legal command that is logically similar to second which works


Thank you,
Raj.

#1-- Error
[raj@rajvista ~]$ echo "Raj" | tr "[[:alpha:]]" "[[:lower:]]"
tr: misaligned [:upper:] and/or [:lower:] construct

#2--Ok
[raj@rajvista ~]$ echo "Raj" | tr "[[:upper:]]" "[[:lower:]]"
raj
[raj@rajvista ~]$


[raj@rajvista ~]$ tr --version
tr (GNU coreutils) 6.12
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jim Meyering.



--933233344-18256676-1325125773=:12785-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 29 04:15:15 2011 Received: (at control) by debbugs.gnu.org; 29 Dec 2011 09:15:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RgC4w-0001Rk-UV for submit@debbugs.gnu.org; Thu, 29 Dec 2011 04:15:15 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RgC4u-0001RY-Lb; Thu, 29 Dec 2011 04:15:13 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id C4E1360130; Thu, 29 Dec 2011 10:12:22 +0100 (CET) From: Jim Meyering To: Raj Kambli Subject: Re: bug#10394: Bug in tr command In-Reply-To: <1325125773.12785.YahooMailNeo@web125603.mail.ne1.yahoo.com> (Raj Kambli's message of "Wed, 28 Dec 2011 18:29:33 -0800 (PST)") References: <1325125773.12785.YahooMailNeo@web125603.mail.ne1.yahoo.com> Date: Thu, 29 Dec 2011 10:12:22 +0100 Message-ID: <8739c3eo7d.fsf@rho.meyering.net> Lines: 24 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control Cc: 10394-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) tags 10394 notabug thanks Raj Kambli wrote: > Not sure if this is bug. But I think first one is legal command that > is logically similar to second which works > > #1-- Error > [raj@rajvista ~]$ echo "Raj" | tr "[[:alpha:]]" "[[:lower:]]" > tr: misaligned [:upper:] and/or [:lower:] construct > > > #2--Ok > [raj@rajvista ~]$ echo "Raj" | tr "[[:upper:]]" "[[:lower:]]" > raj > [raj@rajvista ~]$ Thanks for the report. However, that is not a bug. Your first example really is an error. As documented (see the "character classes" section of "info tr"), when translating (i.e., not deleting), if you specify "lower" or "upper" in the second set, you must specify "upper" or "lower" (resp.) in the first set -- and it must be in the same relative position. From unknown Sat Jun 21 02:59:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 26 Jan 2012 12:24:03 +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