GNU bug report logs - #38082
'tr' question passing tr delete chars argument coded in hex into script as $varable

Previous Next

Package: coreutils;

Reported by: Owen Townsend <owen <at> uvsoftware.ca>

Date: Wed, 6 Nov 2019 01:21:02 UTC

Severity: normal

To reply to this bug, email your comments to 38082 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#38082; Package coreutils. (Wed, 06 Nov 2019 01:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Owen Townsend <owen <at> uvsoftware.ca>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 06 Nov 2019 01:21:02 GMT) Full text and rfc822 format available.

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

From: Owen Townsend <owen <at> uvsoftware.ca>
To: bug-coreutils <at> gnu.org
Subject: 'tr' question passing tr delete chars argument coded in hex into
 script as $varable
Date: Tue, 5 Nov 2019 17:07:41 -0800
[Message part 1 (text/plain, inline)]
To: bug-coreutils.org
From: Owen Townsend, owen <at> uvsoftware.ca
Date: Nov.05/2019
Subject: 'tr' question passing tr delete chars argument coded in hex 
into script as $varable

I am attaching 2 scripts renameLNX & renameLNX1
renameLNX  - delete characters hard-coded on tr - works OK
renameLNX1 - delete characters passed as $variable from cmdline argument 
- does not work
           - is this a bug OR is something wrong with my coding ???

renameLNX1 dirxx '\x20\x21\x27\x28\x29\x2C'  #<-- passing hex delete 
chars cmdline argument
fn2=$(echo $fn1 | tr -d $"$chars")           #<-- does not work
See test results coded as #comments at end of attached renameLNX1 script

fn2=$(echo $fn1 | tr -d $'\x21\x24\x26\x27\x28\x29\x2A\x2C') #<-- 
hard-coded hex deletes OK
See script renameLNX OK

Is this a bug OR is something wrong with my coding ???
Thanks, Owen

[renameLNX (text/plain, attachment)]
[renameLNX1 (text/plain, attachment)]

This bug report was last modified 5 years and 313 days ago.

Previous Next


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