GNU bug report logs - #17121
tr result is different when executed in /usr/bin

Previous Next

Package: coreutils;

Reported by: Benoît DUNAND-LAISIN <benoit.dunand-laisin <at> prologism.fr>

Date: Thu, 27 Mar 2014 15:49:01 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Benoît DUNAND-LAISIN <benoit.dunand-laisin <at> prologism.fr>
Subject: bug#17121: closed (Re: bug#17121: tr result is different when
 executed in /usr/bin)
Date: Thu, 27 Mar 2014 16:07:04 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#17121: tr result is different when executed in /usr/bin

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 17121 <at> debbugs.gnu.org.

-- 
17121: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17121
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eric Blake <eblake <at> redhat.com>
To: Benoît DUNAND-LAISIN
 <benoit.dunand-laisin <at> prologism.fr>, 17121-done <at> debbugs.gnu.org
Subject: Re: bug#17121: tr result is different when executed in /usr/bin
Date: Thu, 27 Mar 2014 10:06:41 -0600
[Message part 3 (text/plain, inline)]
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 (application/pgp-signature, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Benoît DUNAND-LAISIN
 <benoit.dunand-laisin <at> prologism.fr>
To: bug-coreutils <at> gnu.org
Subject: tr result is different when executed in /usr/bin
Date: Thu, 27 Mar 2014 10:43:29 +0100
[Message part 6 (text/plain, inline)]
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.
[Message part 7 (text/html, inline)]

This bug report was last modified 11 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.