bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10394: Bug in tr command


From: Jim Meyering
Subject: bug#10394: Bug in tr command
Date: Thu, 29 Dec 2011 10:12:22 +0100

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
> address@hidden ~]$ echo "Raj" | tr "[[:alpha:]]" "[[:lower:]]"
> tr: misaligned [:upper:] and/or [:lower:] construct
>
>
> #2--Ok
> address@hidden ~]$ echo "Raj" | tr "[[:upper:]]" "[[:lower:]]"
> raj
> address@hidden ~]$

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]