• bash expansion does not respect capitals.

    From William Unruh@2:250/1 to All on Wed Jun 24 02:35:54 2020
    Summary: ls [A-B]* I expect this to give me all files starting with either
    A or B. Instead I get all files starting with A,B,a,b

    The bash expansion seems to ignore capitals.
    (similary for ls [a-b]* )

    How do I get bash to respect the case in its expansion?

    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Wed Jun 24 02:53:10 2020
    On Tue, 23 Jun 2020 21:35:54 -0400, William Unruh <unruh@invalid.ca> wrote:

    The bash expansion seems to ignore capitals.
    (similary for ls [a-b]* )
    How do I get bash to respect the case in its expansion?

    LC_ALL=C ls [a-b]*
    That's from the Pattern Matching section of man bash.
    Note that if a directory starts with a or b, it's full contents will be listed.

    Regards, Dave Hodgins


    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Jun 24 02:55:22 2020
    On Wed, 24 Jun 2020 01:35:54 -0000 (UTC), William Unruh wrote:
    The bash expansion seems to ignore capitals.
    (similary for ls [a-b]* )

    How do I get bash to respect the case in its expansion?

    I would try [a-zA-Z]


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Wed Jun 24 16:48:44 2020
    On 2020-06-24, David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    On Tue, 23 Jun 2020 21:35:54 -0400, William Unruh <unruh@invalid.ca> wrote:

    The bash expansion seems to ignore capitals.
    (similary for ls [a-b]* )
    How do I get bash to respect the case in its expansion?

    LC_ALL=C ls [a-b]*
    That's from the Pattern Matching section of man bash.
    Note that if a directory starts with a or b, it's full contents will be
    listed.

    Thanks.
    My LC_ALL is en_CA.UTF-8. But how in the world does
    en_CA.UTF-8 make a, b occur between A and B? Certainly it distingushes
    between a and A and ls [a]* -d does not list files starting with A.

    And how do , say the French, list files which say start with or contain an accented
    character
    Weird.



    Regards, Dave Hodgins



    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Aragorn@2:250/1 to All on Wed Jun 24 17:06:13 2020
    On 24.06.2020 at 15:48, William Unruh scribbled:

    On 2020-06-24, David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    On Tue, 23 Jun 2020 21:35:54 -0400, William Unruh
    <unruh@invalid.ca> wrote:=20
    The bash expansion seems to ignore capitals.
    (similary for ls [a-b]* )
    How do I get bash to respect the case in its expansion? =20

    LC_ALL=3DC ls [a-b]*
    That's from the Pattern Matching section of man bash.
    Note that if a directory starts with a or b, it's full contents
    will be listed. =20
    =20
    Thanks.
    My LC_ALL is en_CA.UTF-8. But how in the world does
    en_CA.UTF-8 make a, b occur between A and B? Certainly it distingushes between a and A and ls [a]* -d does not list files starting with A.

    It's actually LC_COLLATE which does that. Insofar I know, every locale
    mixes upper- and lowercase for sorting, and only LC_COLLATE=3DC sorts
    uppercase first and lowercase after that =E2=80=94 or vice versa; I don't remember.

    By the way, LC_ALL, when set, overrides all other LC_* variables. So
    for instance, if you have LC_TIME set to "en_CA.UTF-8" and LC_ALL to
    "C", then all of your locale settings are effectively set to "C", even
    though the variables themselves are not altered.


    --=20
    With respect,
    =3D Aragorn =3D


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Strider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 25 00:05:48 2020
    On 2020-06-24, Aragorn <thorongil@telenet.be> wrote:
    On 24.06.2020 at 15:48, William Unruh scribbled:

    On 2020-06-24, David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    On Tue, 23 Jun 2020 21:35:54 -0400, William Unruh
    <unruh@invalid.ca> wrote:
    The bash expansion seems to ignore capitals.
    (similary for ls [a-b]* )
    How do I get bash to respect the case in its expansion?

    LC_ALL=C ls [a-b]*
    That's from the Pattern Matching section of man bash.
    Note that if a directory starts with a or b, it's full contents
    will be listed.

    Thanks.
    My LC_ALL is en_CA.UTF-8. But how in the world does
    en_CA.UTF-8 make a, b occur between A and B? Certainly it distingushes
    between a and A and ls [a]* -d does not list files starting with A.

    It's actually LC_COLLATE which does that. Insofar I know, every locale
    mixes upper- and lowercase for sorting, and only LC_COLLATE=C sorts
    uppercase first and lowercase after that — or vice versa; I don't
    remember.

    But this is different. It is not only sorting them mixed up but is also
    finding them is caseless. [a]* finds only files that start with a, but
    [A-B]* finds files which start with A, a, B, b. That is independent of
    sorting.


    By the way, LC_ALL, when set, overrides all other LC_* variables. So
    for instance, if you have LC_TIME set to "en_CA.UTF-8" and LC_ALL to
    "C", then all of your locale settings are effectively set to "C", even
    though the variables themselves are not altered.



    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Thu Jun 25 01:44:21 2020
    On Wed, 24 Jun 2020 19:05:48 -0400, William Unruh <unruh@invalid.ca> wrote:
    But this is different. It is not only sorting them mixed up but is also finding them is caseless. [a]* finds only files that start with a, but [A-B]* finds files which start with A, a, B, b. That is independent of sorting.

    https://en.wikipedia.org/wiki/Unicode_collation_algorithm
    It ignores case and accents when sorting so that a, A, à, À, etc are all treated
    as being the same.

    When you have [a]*, the square brackets are ignored since it isn't a range being selected.

    Regards, Dave Hodgins

    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 25 06:06:17 2020
    On 2020-06-25, David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    On Wed, 24 Jun 2020 19:05:48 -0400, William Unruh <unruh@invalid.ca> wrote:
    But this is different. It is not only sorting them mixed up but is also
    finding them is caseless. [a]* finds only files that start with a, but
    [A-B]* finds files which start with A, a, B, b. That is independent of
    sorting.

    https://en.wikipedia.org/wiki/Unicode_collation_algorithm
    It ignores case and accents when sorting so that a, A, à, À, etc are all
    treated
    as being the same.

    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly treats A
    and a differently. Also, doing
    LC_COLLATE=C ls [a-b]* still gives me all cases, while LC_ALL=c ls [a-b]*
    does not. Thus it must be some other LC that determines it.


    When you have [a]*, the square brackets are ignored since it isn't a range being selected.

    Regards, Dave Hodgins


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Jun 25 06:36:37 2020
    On Thu, 25 Jun 2020 05:06:17 -0000 (UTC), William Unruh wrote:


    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly treats A
    and a differently.

    Sound about right. [a-z] selects only lowercase.

    See up thread for my suggestion.

    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 25 15:32:12 2020
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 05:06:17 -0000 (UTC), William Unruh wrote:


    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly treats A
    and a differently.

    Sound about right. [a-z] selects only lowercase.

    See up thread for my suggestion.

    Nope

    ls -d [a-b]*
    .......
    BillUnruhPortfolioReview23Mar20-altered.pdf
    Bill.zip
    bin/
    binarypulsar-Sci
    ----

    env|grep LC_
    LC_ALL=en_CA.UTF-8
    LC_SOURCED=1
    LC_CTYPE=C

    LC_COLLATE=C env|grep LC_
    LC_COLLATE=C
    LC_ALL=en_CA.UTF-8
    LC_SOURCED=1
    LC_CTYPE=C

    LC_COLLATE=C ls -d [a-b]*
    .......
    BillUnruhPortfolioReview23Mar20-altered.pdf
    Bill.zip
    bin/
    binarypulsar-Sci
    ----




    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Jun 25 16:56:47 2020
    On Thu, 25 Jun 2020 14:32:12 -0000 (UTC), William Unruh wrote:
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 05:06:17 -0000 (UTC), William Unruh wrote:


    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly treats A
    and a differently.

    Sound about right. [a-z] selects only lowercase.

    See up thread for my suggestion.

    Nope

    ls -d [a-b]*


    One more time [a-b] indicates lowercase only.

    I can suggest reading the following page very carefully. https://www.regular-expressions.info/posixbrackets.html


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 25 17:26:16 2020
    Further experiments.

    LC_ALL='' LC_COLLATE=C ls -d [a-b]*
    still picks out both lower case and capitals, but now orders them with
    capitals first. So it is doing what is needed on sorting, but not on
    selecting.
    What LC_ variable is determining the selection criterion of the bash
    globbing?
    Is there anywhere that tells one what the various LC_ are? Has anyone
    looked at the code for bash to see what it uses? Maybe it uses LC_ALL?


    What determines what bash uses to select the case on globbing?


    On 2020-06-25, William Unruh <unruh@invalid.ca> wrote:
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 05:06:17 -0000 (UTC), William Unruh wrote:


    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly treats A
    and a differently.

    Sound about right. [a-z] selects only lowercase.

    See up thread for my suggestion.

    Nope

    ls -d [a-b]*
    ......
    BillUnruhPortfolioReview23Mar20-altered.pdf
    Bill.zip
    bin/
    binarypulsar-Sci
    ----

    env|grep LC_
    LC_ALL=en_CA.UTF-8
    LC_SOURCED=1
    LC_CTYPE=C

    LC_COLLATE=C env|grep LC_
    LC_COLLATE=C
    LC_ALL=en_CA.UTF-8
    LC_SOURCED=1
    LC_CTYPE=C

    LC_COLLATE=C ls -d [a-b]*
    ......
    BillUnruhPortfolioReview23Mar20-altered.pdf
    Bill.zip
    bin/
    binarypulsar-Sci
    ----




    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 25 17:43:23 2020
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 14:32:12 -0000 (UTC), William Unruh wrote:
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 05:06:17 -0000 (UTC), William Unruh wrote:


    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly treats A >>>> and a differently.

    Sound about right. [a-z] selects only lowercase.

    See up thread for my suggestion.

    Nope

    ls -d [a-b]*


    One more time [a-b] indicates lowercase only.

    One more time. I gave you the evidence. It does not. I have now run the experiment many times. It choses both
    lower and upper case if LC_ALL is en_CA.UTF-8


    I can suggest reading the following page very carefully. https://www.regular-expressions.info/posixbrackets.html

    globbing is not a regular expression.

    I do experiments in this case, not theory.
    What is your value of LC_ALL?
    What do you get if you do
    ls [a-b]* -d
    ?
    (assuming that you have a mixture of lower and upper case file names)

    Reding the bash man page again, I noticed the globasciiranges option.

    Do you have the shell option globasciranges set?
    shopt globasciiranges
    is that on or off? Mine was off.

    I have now put
    shopt -s globasciiranges
    into .bashrc, and the ranges behave properly, as expected, even with
    LC_ALL not being C.




    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Aragorn@2:250/1 to All on Thu Jun 25 17:55:55 2020
    On 25.06.2020 at 14:32, William Unruh scribbled:

    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 05:06:17 -0000 (UTC), William Unruh wrote:


    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly
    treats A and a differently.

    Sound about right. [a-z] selects only lowercase.

    See up thread for my suggestion.

    Nope

    ls -d [a-b]*
    ......
    BillUnruhPortfolioReview23Mar20-altered.pdf
    Bill.zip
    bin/
    binarypulsar-Sci
    ----

    env|grep LC_
    LC_ALL=en_CA.UTF-8
    LC_SOURCED=1
    LC_CTYPE=C

    LC_COLLATE=C env|grep LC_
    LC_COLLATE=C
    LC_ALL=en_CA.UTF-8
    LC_SOURCED=1
    LC_CTYPE=C

    LC_COLLATE=C ls -d [a-b]*
    ......
    BillUnruhPortfolioReview23Mar20-altered.pdf
    Bill.zip
    bin/
    binarypulsar-Sci
    ----

    As I wrote already, Bill, LC_ALL overides all other LC_* settings.

    You have your LC_ALL set to "en_CA.UTF-8". By consequence, your
    "LC_COLLATE=C" has no effect.


    --
    With respect,
    = Aragorn =


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Strider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 25 18:22:06 2020
    While that may be true, I can also do
    LC_ALL='' LC_COLLATE=C ls [a-b]* -d
    Now those capital B filenames are still selected, but they now are
    listed at the beginning of the list of files, instead of interspersed
    with the lower case b file.

    Ie, the LC_ALL does not determine bash glob per se.
    (except of course LC_ALL=C does).
    shopt -s globasciiasciiranges
    does work independent of the setting of LC_ALL.
    LC_COLLATE does not determine the selection process for those ranges.
    LC_ALL does, but I cannot see any specific LC_XXX which does control it.
    Very strange.



    On 2020-06-25, Aragorn <thorongil@telenet.be> wrote:
    On 25.06.2020 at 14:32, William Unruh scribbled:

    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 05:06:17 -0000 (UTC), William Unruh wrote:


    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly
    treats A and a differently.

    Sound about right. [a-z] selects only lowercase.

    See up thread for my suggestion.

    Nope

    ls -d [a-b]*
    ......
    BillUnruhPortfolioReview23Mar20-altered.pdf
    Bill.zip
    bin/
    binarypulsar-Sci
    ----

    env|grep LC_
    LC_ALL=en_CA.UTF-8
    LC_SOURCED=1
    LC_CTYPE=C

    LC_COLLATE=C env|grep LC_
    LC_COLLATE=C
    LC_ALL=en_CA.UTF-8
    LC_SOURCED=1
    LC_CTYPE=C

    LC_COLLATE=C ls -d [a-b]*
    ......
    BillUnruhPortfolioReview23Mar20-altered.pdf
    Bill.zip
    bin/
    binarypulsar-Sci
    ----

    As I wrote already, Bill, LC_ALL overides all other LC_* settings.

    You have your LC_ALL set to "en_CA.UTF-8". By consequence, your "LC_COLLATE=C" has no effect.



    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Jun 25 18:44:00 2020
    On Thu, 25 Jun 2020 16:43:23 -0000 (UTC), William Unruh wrote:
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 14:32:12 -0000 (UTC), William Unruh wrote:
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 05:06:17 -0000 (UTC), William Unruh wrote:


    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly treats A >>>>> and a differently.

    Sound about right. [a-z] selects only lowercase.

    See up thread for my suggestion.

    Nope

    ls -d [a-b]*


    One more time [a-b] indicates lowercase only.

    One more time. I gave you the evidence. It does not.

    And yet, it is working as you directed it to do so.
    NOT like you wanted. You tell it you want Uppercase and see what happens.


    I have now run the experiment many times. It choses both
    lower and upper case if LC_ALL is en_CA.UTF-8


    I can suggest reading the following page very carefully.
    https://www.regular-expressions.info/posixbrackets.html

    globbing is not a regular expression.

    I do experiments in this case, not theory.

    Screw theory. I am trying to get you to read how your brackets are working. Apparently you are not going to do so. :(

    What is your value of LC_ALL?

    I always try to work with defaults wherever possible.
    $ env | grep LC_
    LC_SOURCED=1

    What do you get if you do
    ls [a-b]* -d
    ?
    (assuming that you have a mixture of lower and upper case file names)

    As indicated I get any file name with a lower case letter in the a to b range. Adding uppercase A and B to the range gets me the files with uppercase A to B range.

    $ ls
    a1.a a.a a.A A.a b.b B.B

    $ ls [a-b]*
    a1.a a.a a.A A.a b.b

    $ ls [a-bA-B]*
    a1.a a.a a.A A.a b.b B.B



    Reding the bash man page again, I noticed the globasciiranges option.

    Do you have the shell option globasciranges set?
    shopt globasciiranges
    is that on or off? Mine was off.

    Same here.

    I have now put
    shopt -s globasciiranges
    into .bashrc, and the ranges behave properly, as expected, even with
    LC_ALL not being C.


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Aragorn@2:250/1 to All on Thu Jun 25 19:52:08 2020
    On 25.06.2020 at 17:22, William Unruh scribbled:

    While that may be true, I can also do
    LC_ALL='' LC_COLLATE=C ls [a-b]* -d
    Now those capital B filenames are still selected, but they now are
    listed at the beginning of the list of files, instead of interspersed
    with the lower case b file.

    Ie, the LC_ALL does not determine bash glob per se.
    (except of course LC_ALL=C does).
    shopt -s globasciiasciiranges
    does work independent of the setting of LC_ALL.
    LC_COLLATE does not determine the selection process for those ranges.
    LC_ALL does, but I cannot see any specific LC_XXX which does control
    it. Very strange.

    But, you forgot the number-one rule... The shell always globs BEFORE
    processing anything else. So the "*" in your command was already
    globbed BEFORE the "[a-b]" was.


    --
    With respect,
    = Aragorn =


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Strider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 25 20:35:58 2020
    On 2020-06-25, Aragorn <thorongil@telenet.be> wrote:
    On 25.06.2020 at 17:22, William Unruh scribbled:

    While that may be true, I can also do
    LC_ALL='' LC_COLLATE=C ls [a-b]* -d
    Now those capital B filenames are still selected, but they now are
    listed at the beginning of the list of files, instead of interspersed
    with the lower case b file.

    Ie, the LC_ALL does not determine bash glob per se.
    (except of course LC_ALL=C does).
    shopt -s globasciiasciiranges
    does work independent of the setting of LC_ALL.
    LC_COLLATE does not determine the selection process for those ranges.
    LC_ALL does, but I cannot see any specific LC_XXX which does control
    it. Very strange.

    But, you forgot the number-one rule... The shell always globs BEFORE processing anything else. So the "*" in your command was already
    globbed BEFORE the "[a-b]" was.

    Which is why I said bash was doing it. [a-b] is also glob (and if * were
    done before [a-b] then it would have no idea what to grab, because that
    is the first character). It is the shell that globs the [a-b] as well,
    as
    echo [a-b]*
    shows




    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 25 22:47:04 2020
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 16:43:23 -0000 (UTC), William Unruh wrote:
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 14:32:12 -0000 (UTC), William Unruh wrote:
    On 2020-06-25, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 25 Jun 2020 05:06:17 -0000 (UTC), William Unruh wrote:


    But as I said, it is not sorting. It is selecting.
    Since a* is different from A* the selection algorithm clearly treats A >>>>>> and a differently.

    Sound about right. [a-z] selects only lowercase.

    See up thread for my suggestion.

    Nope

    ls -d [a-b]*


    One more time [a-b] indicates lowercase only.

    One more time. I gave you the evidence. It does not.

    And yet, it is working as you directed it to do so.
    NOT like you wanted. You tell it you want Uppercase and see what happens.


    I have now run the experiment many times. It choses both
    lower and upper case if LC_ALL is en_CA.UTF-8


    I can suggest reading the following page very carefully.
    https://www.regular-expressions.info/posixbrackets.html

    globbing is not a regular expression.

    I do experiments in this case, not theory.

    Screw theory. I am trying to get you to read how your brackets are working. Apparently you are not going to do so. :(

    What is your value of LC_ALL?

    I always try to work with defaults wherever possible.
    $ env | grep LC_
    LC_SOURCED=1

    What do you get if you do
    ls [a-b]* -d
    ?
    (assuming that you have a mixture of lower and upper case file names)

    As indicated I get any file name with a lower case letter in the a to b
    range.
    Adding uppercase A and B to the range gets me the files with uppercase A to
    B range.

    I do not. As I indicated I get the same as if I did [abB]*
    If I do LC_ALL=C I get what you get. But then since so many things send
    out utf these days it is nice to see them instead of splodges on the
    page.

    However on another machine I have
    env|grep LC_
    LC_SOURCED=1
    LC_CTYPE=C

    and I get the equiv to
    ls -d [aBb]
    If I unset LC_CTYPE
    I still get the same.

    So I am NOT getting either what I asked for nor am I getting anything consistant.





    $ ls
    a1.a a.a a.A A.a b.b B.B

    $ ls [a-b]*
    a1.a a.a a.A A.a b.b

    $ ls [a-bA-B]*
    a1.a a.a a.A A.a b.b B.B



    Reding the bash man page again, I noticed the globasciiranges option.

    Do you have the shell option globasciranges set?
    shopt globasciiranges
    is that on or off? Mine was off.

    Same here.

    So, I have

    I have now put
    shopt -s globasciiranges
    into .bashrc, and the ranges behave properly, as expected, even with
    LC_ALL not being C.


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Fri Jun 26 01:25:40 2020
    On Thu, 25 Jun 2020 21:47:04 -0000 (UTC), William Unruh wrote:

    I do not. As I indicated I get the same as if I did [abB]*


    Just be aware that [abB]* is not the same thing as [a-bB]*.

    $ ls [a-bB]*
    a1.a a.a a.A A.a a.B b.b B.B B.c

    $ ls [abB]*
    a1.a a.a a.A a.B b.b B.B B.c

    $ ls
    1a.a a1.a a.a a.A A.a a.B b.b B.B B.c c.a c.b c.d da.ad

    $ env | grep utf
    LANG=en_US.utf8
    LANGUAGE=en_US.UTF-8:en_US:en
    LESSCHARSET=utf-8
    XTERM_LOCALE=en_US.utf8

    $ echo $TERM
    xterm

    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Fri Jun 26 23:31:48 2020
    On 26/6/20 10:25 am, Bit Twister wrote:

    $ env | grep utf
    LANG=en_US.utf8
    LANGUAGE=en_US.UTF-8:en_US:en
    LESSCHARSET=utf-8
    XTERM_LOCALE=en_US.utf8

    $ echo $TERM
    xterm


    Curiously I require "-i" to be stated.
    Do you have it set globally?

    [faeychild@unimatrix ~]$ env | grep -i utf
    LC_MEASUREMENT=en_AU.UTF-8
    LANG=en_AU.UTF-8
    LC_TIME=en_AU.UTF-8


    [faeychild@unimatrix ~]$ env | grep utf
    [faeychild@unimatrix ~]$



    --
    faeychild
    Running plasmashell 5.15.4 on 5.6.14-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Jun 27 00:34:29 2020
    On Sat, 27 Jun 2020 08:31:48 +1000, faeychild wrote:
    On 26/6/20 10:25 am, Bit Twister wrote:

    $ env | grep utf
    LANG=en_US.utf8
    LANGUAGE=en_US.UTF-8:en_US:en
    LESSCHARSET=utf-8
    XTERM_LOCALE=en_US.utf8

    $ echo $TERM
    xterm


    Curiously I require "-i" to be stated.
    Do you have it set globally?

    Sorry about that. Yes I do. Same for locate.

    $ type grep
    grep is aliased to `grep --color --ignore-case'

    $ type locate
    locate is aliased to `locate --ignore-case'



    [faeychild@unimatrix ~]$ env | grep -i utf
    LC_MEASUREMENT=en_AU.UTF-8
    LANG=en_AU.UTF-8
    LC_TIME=en_AU.UTF-8


    [faeychild@unimatrix ~]$ env | grep utf
    [faeychild@unimatrix ~]$

    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sun Jun 28 01:56:05 2020
    On 27/6/20 9:34 am, Bit Twister wrote:


    Sorry about that. Yes I do. Same for locate.

    $ type grep
    grep is aliased to `grep --color --ignore-case'

    $ type locate
    locate is aliased to `locate --ignore-case'





    Ahh

    [faeychild@unimatrix ~]$ type grep
    grep is aliased to `grep --color'


    [faeychild@unimatrix ~]$ type locate
    locate is /usr/bin/locate



    tiny but profound differences

    regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.6.14-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.17 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)