GNU bug report logs - #29421
bug in command "tr"

Previous Next

Package: coreutils;

Reported by: wangjian <halfmoonhalf <at> gmail.com>

Date: Fri, 24 Nov 2017 02:19:01 UTC

Severity: normal

Tags: notabug

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

Bug is archived. No further changes may be made.

Full log


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

From: Pádraig Brady <P <at> draigBrady.com>
To: wangjian <halfmoonhalf <at> gmail.com>, 29421 <at> debbugs.gnu.org
Subject: Re: bug#29421: bug in command "tr"
Date: Thu, 23 Nov 2017 18:31:13 -0800
tag 29421 notabug
close 29421
stop

On 23/11/17 17:01, wangjian wrote:
> Hi there, I think this is a bug
> 
> mkdir empty_foler
> cd empty_foler
> touch a
> echo "abc" | tr [:blank:] +  # you will get “+bc” as output, instead of “abc”
> touch b
> echo "abc" | tr [:blank:]  # you will get “bbc” as output, instead of “abc”
> 
> My system info:
> CentOS release 6.7 (Final)
> linux kernel version 2.6.32-573.el6.x86_64

You must have a file called "a" in the current directory.
You'll need to quote so the shell doesn't change it on you.
I.E:

  echo "a bc" | tr '[:blank:]' +
  a+bc

cheers,
Pádraig




This bug report was last modified 7 years and 242 days ago.

Previous Next


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