--- Begin Message ---
Subject: |
tr result is different when executed in /usr/bin |
Date: |
Thu, 27 Mar 2014 10:43:29 +0100 |
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.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#17121: tr result is different when executed in /usr/bin |
Date: |
Thu, 27 Mar 2014 10:06:41 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
tag 17121 notabug
thanks
On 03/27/2014 03: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:]
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.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
--- End Message ---