emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#28316: closed (tr -d)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#28316: closed (tr -d)
Date: Fri, 01 Sep 2017 17:10:02 +0000

Your message dated Fri, 1 Sep 2017 12:09:08 -0500
with message-id <address@hidden>
and subject line Re: bug#28316: tr -d
has caused the debbugs.gnu.org bug report #28316,
regarding tr -d
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
28316: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28316
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: tr -d Date: Fri, 1 Sep 2017 12:28:32 +0100
macOS 10.12.

Problems with tr -d
Removal of character 'd' from test string when tr invoked with -d incantation.

Example

address@hidden ~ $ echo uuid:8ddddb8d5 | tr -d 'uuid:'

Expected output
8ddddb8d5

Actual output
8b85


--- End Message ---
--- Begin Message --- Subject: Re: bug#28316: tr -d Date: Fri, 1 Sep 2017 12:09:08 -0500 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
tag 28316 notabug
thanks

On 09/01/2017 06:28 AM, John Pateman wrote:
> macOS 10.12.
> 
> Problems with tr -d
> Removal of character 'd' from test string when tr invoked with -d
> incantation.
> 
> Example
> 
> address@hidden ~ $ echo uuid:8ddddb8d5 | tr -d 'uuid:'

That asks tr to delete all individual instances of 'd', 'i', 'u', and
':' in the input string, regardless of their context.

> 
> Expected output
> 8ddddb8d5
> 
> Actual output
> 8b85

The behavior you observed was correct. To get what you want, you need to
use a tool that can do substring removal, rather than individual
character removal; sed and awk are such tools:

$ echo uuid:8ddddb8d5 | sed s/uuid://
8ddddb8d5

As such, I'm tagging this as not a bug; but feel free to reply with any
further questions on the topic.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]