From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 01 11:08:02 2017 Received: (at submit) by debbugs.gnu.org; 1 Sep 2017 15:08:02 +0000 Received: from localhost ([127.0.0.1]:40349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnnYA-0007KJ-Iu for submit@debbugs.gnu.org; Fri, 01 Sep 2017 11:08:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnk7w-0008KY-H2 for submit@debbugs.gnu.org; Fri, 01 Sep 2017 07:28:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnk7q-0005cz-Bt for submit@debbugs.gnu.org; Fri, 01 Sep 2017 07:28:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47831) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnk7q-0005cv-8G for submit@debbugs.gnu.org; Fri, 01 Sep 2017 07:28:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnk7p-0008Og-Ai for bug-coreutils@gnu.org; Fri, 01 Sep 2017 07:28:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnk7o-0005cV-Fh for bug-coreutils@gnu.org; Fri, 01 Sep 2017 07:28:37 -0400 Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]:34868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dnk7o-0005bw-7F for bug-coreutils@gnu.org; Fri, 01 Sep 2017 07:28:36 -0400 Received: by mail-lf0-x22b.google.com with SMTP id g18so8182858lfl.2 for ; Fri, 01 Sep 2017 04:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=GFYOGyjNXn3EPryMLcmF1on7RzHbPuGsCldkFxlEhk4=; b=ERXgnNg/RFza6Edw7DdFxPhJcV6O5yr+mHEmidr6SutVoUIRAJsABMvzLoJBrhTdut ND+BIQJBgyMe7pxQ0ccJJhYfIp1h6ZjIO6ZUK1C4NfuOpHy12WZFHvdvSQT+FLo8MZ2i aY7buLZBxJhWbcZPDiC79mEgvCZmmqQ4FEdmmErduYqXgpUmamEiTHu5zcLZxyZtCXtN XITBmefB5TIZGYtdtoags1MfWOlLrVVJLN+KWeJ03Xmb5tHLZPN3Xa1HKI99zteUTvV7 hlS3H7WQHERhGsRP0VslYAaqlKadyTR9fgs9qIPu8up58gogqCGOicV9UCn4i35XG3fI C/yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=GFYOGyjNXn3EPryMLcmF1on7RzHbPuGsCldkFxlEhk4=; b=KW67tEKCiOLNc6R88uE6a363fuRrgldmusPULPVWJReOlIoX6/5GhXDZuDoHohfQKA JjSRR7L/JKZ7nZQXLTxu8+yxKb50pNQtHYQ+2dxpn8I5MP3IBgrLK+10+1IO60SpWOUm BsJ+t6MUPW4dRUsq70P1tLiaAV0h/jt4NIqDQQveX187B628wMMNHi0yVPxgl77uInVg bZHcBbTAiiHuUcuUQ49QbyAxsjiJegBCvL9MboUjMTDUAZ2XrPmzNAkLC3yKYMbCGvOv aqUZ2E0XPxal9DLw76GqnwtRBGxLpW3onPqmpd3Q4fW5n4OJlbuu1GDuHMjquQOI3jf3 UInQ== X-Gm-Message-State: AHPjjUjmqwM0AYZrO9nfwGo47q9saT7xRV6z3dAWtLtfayJDEywvtyfV d3nnrgMLB1RNQA4mq6ysEwej3hKcCUQI X-Google-Smtp-Source: ADKCNb4sedvFCcR+hZI9Hqf2lhkDi63xJFXUWciG1Rz/5QmbXcJ1QWapUblNiJZBXrWqiZakj4nTwmg7rpWXjylwRNU= X-Received: by 10.46.22.27 with SMTP id w27mr669843ljd.164.1504265312950; Fri, 01 Sep 2017 04:28:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.21.10 with HTTP; Fri, 1 Sep 2017 04:28:32 -0700 (PDT) From: John Pateman Date: Fri, 1 Sep 2017 12:28:32 +0100 Message-ID: Subject: tr -d To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary="f403043641b0a05d8a05581f0fae" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 01 Sep 2017 11:07:59 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --f403043641b0a05d8a05581f0fae Content-Type: text/plain; charset="UTF-8" macOS 10.12. Problems with tr -d Removal of character 'd' from test string when tr invoked with -d incantation. Example [abc@xyx] ~ $ echo uuid:8ddddb8d5 | tr -d 'uuid:' Expected output 8ddddb8d5 Actual output 8b85 --f403043641b0a05d8a05581f0fae Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
macOS 10.12.

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

Example

<= div>[abc@xyx] ~ $ echo uuid:8ddddb8d5 |= tr -d 'uuid:'

Expected o= utput
8ddd= db8d5

Actual output
8b85

--f403043641b0a05d8a05581f0fae-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 01 13:09:18 2017 Received: (at control) by debbugs.gnu.org; 1 Sep 2017 17:09:18 +0000 Received: from localhost ([127.0.0.1]:40471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnpRW-0001gV-Gp for submit@debbugs.gnu.org; Fri, 01 Sep 2017 13:09:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnpRU-0001gA-0l; Fri, 01 Sep 2017 13:09:16 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 10402C058ECF; Fri, 1 Sep 2017 17:09:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 10402C058ECF Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eblake@redhat.com Received: from [10.10.121.149] (ovpn-121-149.rdu2.redhat.com [10.10.121.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id 75C977B092; Fri, 1 Sep 2017 17:09:09 +0000 (UTC) Subject: Re: bug#28316: tr -d To: John Pateman , 28316-done@debbugs.gnu.org References: From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <3466228c-a96c-431a-07b5-4885fc577ba1@redhat.com> 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 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sRTD4qC6V8bJknOIdBLtitJQattn9itED" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 01 Sep 2017 17:09:10 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sRTD4qC6V8bJknOIdBLtitJQattn9itED Content-Type: multipart/mixed; boundary="CQIpXRdGPSO8JQNUScVKmu1cuwfnpiAMb"; protected-headers="v1" From: Eric Blake To: John Pateman , 28316-done@debbugs.gnu.org Message-ID: <3466228c-a96c-431a-07b5-4885fc577ba1@redhat.com> Subject: Re: bug#28316: tr -d References: In-Reply-To: --CQIpXRdGPSO8JQNUScVKmu1cuwfnpiAMb Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable tag 28316 notabug thanks On 09/01/2017 06:28 AM, John Pateman wrote: > macOS 10.12. >=20 > Problems with tr -d > Removal of character 'd' from test string when tr invoked with -d > incantation. >=20 > Example >=20 > [abc@xyx] ~ $ 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. >=20 > Expected output > 8ddddb8d5 >=20 > 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. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --CQIpXRdGPSO8JQNUScVKmu1cuwfnpiAMb-- --sRTD4qC6V8bJknOIdBLtitJQattn9itED Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlmplDQACgkQp6FrSiUn Q2qpvgf/VA3wsB4nYojTY1lry/JCGESrFHzO0yd4uCV1+okqlw9ncfN1ROaznmIf 6xuiEZF8zTbxY6LQlh3HkZWFyBiK/apWjvfCdf6svUWrIrDNzjJZ0qYYXs/MzlRi A1XarpuQorc690bv9OXZKfTLePx2qtvjwQr5GF/QN+QwSqnw0vk8K2HFwxi33Fww 2ezdL704w90ZO6ny34KKhb3GaO9eAy7euSYsw4XY4xeDmmqh8VBmSp8oDrfqxxP/ ebXYqnEKdJagyzUHKs23BMkOSMi3QIxwaVJDHR5xA1dsXdMrsbp9/r85auPWoqEi epFEmeqQvfdL3ttidv2vpNvc0co7Bg== =/tqI -----END PGP SIGNATURE----- --sRTD4qC6V8bJknOIdBLtitJQattn9itED-- From unknown Mon Jun 23 18:32:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 30 Sep 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator