[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#29421: bug in command "tr"
From: |
Pádraig Brady |
Subject: |
bug#29421: bug in command "tr" |
Date: |
Thu, 23 Nov 2017 18:31:13 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
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