Subject: bug#10394: closed (Re: bug#10394: Bug in tr command)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 29 Dec 2011 09:16:03 +0000

Your bug report

#10394: Bug in tr command

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
10394: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10394
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#10394: Bug in tr command
From: Jim Meyering <[email-masked]>
To: Raj Kambli <[email-masked]>
Cc: [email-masked]
Date: Thu, 29 Dec 2011 10:12:22 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

Subject: Bug in tr command
From: Raj Kambli <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Wed, 28 Dec 2011 18:29:33 -0800 (PST)
List-Id: <debbugs-submit.debbugs.gnu.org>

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.