GNU bug report logs - #19654
tr command odd behavior on Linux Platform

Previous Next

Package: coreutils;

Reported by: Kousik Mandal <kousikmandal <at> gmail.com>

Date: Thu, 22 Jan 2015 17:28:02 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19654 in the body.
You can then email your comments to 19654 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#19654; Package coreutils. (Thu, 22 Jan 2015 17:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kousik Mandal <kousikmandal <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 22 Jan 2015 17:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kousik Mandal <kousikmandal <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: tr command odd behavior on Linux Platform
Date: Thu, 22 Jan 2015 15:22:42 +0530
[Message part 1 (text/plain, inline)]
Hi Team,

I am observing an unexpected behavior with tr command. In a directory if
there exist one file named a and executing following tr command.
---script---
myVar="Hello World"
$ echo $myVar|tr [A-Z] [a-z]
---script---

It gives Output: aello aorld

Where as if there exist another file/directory named b then the same
command it failing with below error

---script---
myVar="Hello World"
$ echo $myVar|tr [A-Z] [a-z]
---script---

Output:
tr: extra operand `b'
Try `tr --help' for more information.

If only file b is present then the same command is not failing but it give
wrong output.

---script---
myVar="Hello World"
$ echo $myVar|tr [A-Z] [a-z]
---script---

Output:
Hello World

Same type of observation found if only a single alphabetic name file or
directory is exist.

Can you please update me it is a bug or expected behavior?

Thanks,
Kousik
[Message part 2 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#19654; Package coreutils. (Thu, 22 Jan 2015 18:12:01 GMT) Full text and rfc822 format available.

Message #8 received at 19654 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Kousik Mandal <kousikmandal <at> gmail.com>, 19654 <at> debbugs.gnu.org
Subject: Re: bug#19654: tr command odd behavior on Linux Platform
Date: Thu, 22 Jan 2015 18:11:47 +0000
tag 19654 notabug
close 19654
stop

On 22/01/15 09:52, Kousik Mandal wrote:
> Hi Team,
> 
> I am observing an unexpected behavior with tr command. In a directory if there exist one file named a and executing following tr command.

This is becoming a FAQ:
http://lists.gnu.org/archive/html/coreutils/2014-12/msg00041.html

thanks,
Pádraig.





Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Thu, 22 Jan 2015 18:12:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 19654 <at> debbugs.gnu.org and Kousik Mandal <kousikmandal <at> gmail.com> Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Thu, 22 Jan 2015 18:12:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Feb 2015 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 122 days ago.

Previous Next


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