[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash removes unrequested characters in bracket expressions (not a ra
From: |
Chet Ramey |
Subject: |
Re: Bash removes unrequested characters in bracket expressions (not a range). |
Date: |
Sat, 24 Nov 2018 14:06:21 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 11/23/18 6:09 PM, Bize Ma wrote:
> Bash Version: 4.4
> Patch Level: 12
> Release Status: release
>
>
>
> Description:
>
> Bash is removing characters not explicitly listed in a bracket
> expression (character range).
> In this example, it is removing digits from other languages.
>
> Also tested (and it fails) in bash 3.{0,1,3} 4.{1,2,3} and 5.0
> Not a problem in bash 2.{0,1}
I can't reproduce this:
$ cat ./x4
a='0123456789 ٠١٢٣٤٥٦٧٨٩ ۰۱۲۳۴۵۶۷۸۹ ߀߁߂߃߄߅߆߇߈߉ ०१२३४५६७८९'
recho "${a}"
recho "${a//[0123456789]}"
$ ../bash-5.0-beta2/bash ./x4
argv[1] = <0123456789 ٠١٢٣٤٥٦٧٨٩ ۰۱۲۳۴۵۶۷۸۹ ߀߁߂߃߄߅߆߇߈߉ ०१२३४५६७८९>
argv[1] = < ٠١٢٣٤٥٦٧٨٩ ۰۱۲۳۴۵۶۷۸۹ ߀߁߂߃߄߅߆߇߈߉ ०१२३४५६७८९>
$ ../bash-4.4-patched/bash ./x4
argv[1] = <0123456789 ٠١٢٣٤٥٦٧٨٩ ۰۱۲۳۴۵۶۷۸۹ ߀߁߂߃߄߅߆߇߈߉ ०१२३४५६७८९>
argv[1] = < ٠١٢٣٤٥٦٧٨٩ ۰۱۲۳۴۵۶۷۸۹ ߀߁߂߃߄߅߆߇߈߉ ०१२३४५६७८९>
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/