Received: (at submit) by debbugs.gnu.org; 6 Nov 2019 01:20:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 05 20:20:40 2019 Received: from localhost ([127.0.0.1]:39324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iS9zy-0002Bw-3c for submit <at> debbugs.gnu.org; Tue, 05 Nov 2019 20:20:38 -0500 Received: from lists.gnu.org ([209.51.188.17]:48198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <owen@HIDDEN>) id 1iS9ne-0008Hu-BO for submit <at> debbugs.gnu.org; Tue, 05 Nov 2019 20:07:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34586) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <owen@HIDDEN>) id 1iS9nc-0007iA-Sf for bug-coreutils@HIDDEN; Tue, 05 Nov 2019 20:07:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <owen@HIDDEN>) id 1iS9nZ-00022J-UG for bug-coreutils@HIDDEN; Tue, 05 Nov 2019 20:07:52 -0500 Received: from mail6.webfaction.com ([31.170.123.134]:58460 helo=smtp.webfaction.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <owen@HIDDEN>) id 1iS9nZ-0001nQ-L5 for bug-coreutils@HIDDEN; Tue, 05 Nov 2019 20:07:49 -0500 Received: from [192.168.1.5] (d99-199-114-146.bchsia.telus.net [99.199.114.146]) by smtp.webfaction.com (Postfix) with ESMTPSA id D489C6004DFA0 for <bug-coreutils@HIDDEN>; Wed, 6 Nov 2019 01:07:47 +0000 (UTC) To: bug-coreutils@HIDDEN From: Owen Townsend <owen@HIDDEN> Subject: 'tr' question passing tr delete chars argument coded in hex into script as $varable Message-ID: <36ca5847-3b89-50c5-fd21-9f239fa67ef5@HIDDEN> Date: Tue, 5 Nov 2019 17:07:41 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------8FE75F2BF66CF21C70BA8584" Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 31.170.123.134 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 05 Nov 2019 20:20:36 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) This is a multi-part message in MIME format. --------------8FE75F2BF66CF21C70BA8584 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable To: bug-coreutils.org From: Owen Townsend, owen@HIDDEN Date: Nov.05/2019 Subject: 'tr' question passing tr delete chars argument coded in hex=20 into script as $varable I am attaching 2 scripts renameLNX & renameLNX1 renameLNX=C2=A0 - delete characters hard-coded on tr - works OK renameLNX1 - delete characters passed as $variable from cmdline argument=20 - does not work =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - is this a= bug OR is something wrong with my coding ??? renameLNX1 dirxx '\x20\x21\x27\x28\x29\x2C'=C2=A0 #<-- passing hex delete= =20 chars cmdline argument fn2=3D$(echo $fn1 | tr -d $"$chars")=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 #<-- does not work See test results coded as #comments at end of attached renameLNX1 script fn2=3D$(echo $fn1 | tr -d $'\x21\x24\x26\x27\x28\x29\x2A\x2C') #<--=20 hard-coded hex deletes OK See script renameLNX OK Is this a bug OR is something wrong with my coding ??? Thanks, Owen --------------8FE75F2BF66CF21C70BA8584 Content-Type: text/plain; charset=UTF-8; name="renameLNX" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="renameLNX" IyEvYmluL2Jhc2gKIyByZW5hbWVMTlggLSBLb3JuIHNoZWxsIHNjcmlwdCBmcm9tIFVWU0kg c3RvcmVkIGluOiAvaG9tZS91dmFkbS9zZi91dGlsLwojIHJlbmFtZUxOWCAtIHJlbmFtZSBh bGwgZmlsZXMgaW4gZGlyZWN0b3J5IHRvIExpbnV4IGZpbGVuYW1pbmcgY29udmVudGlvbnMK IyAgICAgICAgICAgLSBEZWxldGluZyBjaGFyYWN0ZXJzIGluIGZpbGVuYW1lcyB0aGF0IG11 c3QgYmUgZXNjYXBlZCBvbiBMaW51eCBzeXN0ZW1zCiMgICAgICAgICAgIC0gYWxzbyByZW1v dmluZyBMb3dCaXQgJiBIaUJpdCBjaGFyYWN0ZXJzIHVzaW5nIGNvbXBsZW1lbnQgb3B0aW9u ICYgb2N0YWwgY29kZXMKIyByZW5hbWVMTlgxIC0gb3JpZ2luYWwgc2NyaXB0IGRpZCBub3Qg d29yayB0cnlpbmcgdG8gdXNlICIkY2hhcn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aHRwYXJlbj0pLGVj bGFtYXRpb249ISAgICAgICAgICAgICAgICAgLSAkYXJnMiBwYXNzZWQgdG8gdHIgPz8/CiMg CiNOb3RlIC0gY2hhcmFjdGVycyAxLDIseCBhcmUgcmVtb3ZlZCAtIHdoeSBpcyBIRVggbm90 IHJlY29nbml6ZWQgCiMgICAgIC0gQlVUIGl0IHdvcmtzIGlmIEkgaGFyZCBjb2RlICB0aGUg J3RyJyBsaW5lIGFzIGZvbGxvd3M6CiMgIGZuMj0kKGVjaG8gJGZuMSB8IHRyIC1kICQnXHgy MVx4MjRceDI2XHgyN1x4MjhceDI5XHgyQVx4MkMnKQojICAjPT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KIwojIFdoeSBIYXJk LUNvZGluZyBvbiAndHInIHdvcmtzLCBidXQgbm90IHN1YnN0aXR1dGluZyBhcyBpbiByZW5h bWVMTlgxID8/PwojIHJlbmFtZUxOWDEgZGlyeHggJ1x4MjBceDIxXHgyMi4uLmV0Yy4uLicg IDwtLSByZW5hbWVMTlgxIGRlbGV0ZXMgYXJnMiAodHIgLWQgXCQiJGNoYXJzIikKIyA9PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiMgICAgZm4zPSQoZWNobyAk Zm4xIHwgdHIgLWQgXCQiJGNoYXJzIikgICAgPC0tICRhcmcyIG9uIHRyIGRvZXMgTk9UIHdv cmsgPz8/CiMgICAgIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K --------------8FE75F2BF66CF21C70BA8584 Content-Type: text/plain; charset=UTF-8; name="renameLNX1" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="renameLNX1" IyEvYmluL2Jhc2gKIyByZW5hbWVMTlgxIC0gS29ybiBzaGVsbCBzY3JpcHQgZnJvbSBVVlNJ IHN0b3JlZCBpbjogL2hvbWUvdXZhZG0vc2YvdXRpbC8KIyByZW5hbWVMTlgxIC0gcmVuYW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W90ZXM9JyIscGFyZW5zPSgpLHN0YXI9Kixjb21tYT0sCiMgZmlsZSM9Ymxhbmtz IGNvbW1hPSwgbGVmdHBhcmVuPSgsIHJpZ2h0cGFyZW49KSwgZWNsYW1hdGlvbj0hICAgICA8 LS0gcmVuYW1lTE5YMSBOT1Qgd29ya2luZwojIGZpbGUjPWNvbW1hPSxsZWZ0cGFyZW49KCxy aWdodHBhcmVuPSksZWNsYW1hdGlvbj0hICAgICAgICAgICAgICAgICAtICRhcmcyIHBhc3Nl ZCB0byB0ciA/Pz8KIyAKI05vdGUgLSBjaGFyYWN0ZXJzIDEsMix4IGFyZSByZW1vdmVkIC0g d2h5IGlzIEhFWCBub3QgcmVjb2duaXplZCAKIyAgICAgLSBCVVQgaXQgd29ya3MgaWYgSSBo YXJkIGNvZGUgIHRoZSAndHInIGxpbmUgYXMgZm9sbG93czoKIyAgZm4yPSQoZWNobyAkZm4x IHwgdHIgLWQgJCdceDIxXHgyNFx4MjZceDI3XHgyOFx4MjlceDJBXHgyQycpCiMgICM9PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PQojTm90ZSAtIHNlZSAicmVuYW1lTE5YIiBhbHQgc2NyaXB0IHdpdGggSEFSRC1DT0RFRCBo ZXggY2hhcnMgb24gJ3RyJywgd29ya3MgT0sK --------------8FE75F2BF66CF21C70BA8584--
Owen Townsend <owen@HIDDEN>
:bug-coreutils@HIDDEN
.
Full text available.bug-coreutils@HIDDEN
:bug#38082
; Package coreutils
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.