Subject: bug#38082: 'tr' question passing tr delete chars argument coded in hex into script as $varable

From: Owen Townsend <[email-masked]>
Date: Tue, 5 Nov 2019 17:07:41 -0800

To: bug-coreutils.org
From: Owen Townsend, [email-masked]
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