On 30.1. 20:54, ken young wrote:
        I have a directory with four files A Z a z only.
        "ls [A-Z]" displays only 3 files A Z   z       ;a is missing
        "ls [a-z]" displays only 3 files A   a z       ;Z is missing

Basically, your locale orders the letters as aAbBcC...yYzZ, so Z comes after z and [a-z] misses it. Similarly for a and [A-Z]. You can see the ordering if you do 'echo *' or such.

'shopt -s globasciiranges' should make [a-z] only match the 26 ASCII lowercase letters, and 'shopt -s nocaseglob' should make the globs match regardless of lettercase (it would also make a* match A).


--
Ilkka Virta / itvi...@iki.fi

Reply via email to