Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14849
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Bash removes unrequested characters in bracket expressions (not a range). |
| Date | 2018-11-24 14:06 -0500 |
| Organization | ITS, Case Western Reserve University |
| Message-ID | <mailman.4542.1543086410.1284.bug-bash@gnu.org> (permalink) |
| References | <CAFra36hcAjBHGgd_8sHjOV4wSzjmdCyLV2aQo8Ww1bwJqkxYQA@mail.gmail.com> |
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/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Bash removes unrequested characters in bracket expressions (not a range). Chet Ramey <chet.ramey@case.edu> - 2018-11-24 14:06 -0500
csiph-web