It looks like a locale issue. In the old "C" locale, sorting a list put all cap letters before all lowercase letters. In the "en_US.UTF-8" locale, apparently the Ubuntu default, they're sorted as in a regular dictionary, regardless of caps. For example: ls apple berry Berry charlie Hope that's more helpful than my first response! Ted On Fri, Jun 19, 2015 at 9:46 AM, Theodore Ruegsegger <gruntly@gmail.com> wrote:
Disregard last transmission. I shoulda read your post more carefully.
Ted
On Fri, Jun 19, 2015 at 9:44 AM, Theodore Ruegsegger <gruntly@gmail.com> wrote:
b != B
HTH, Ted
On Fri, Jun 19, 2015 at 9:29 AM, Brett Russ <bruss@alum.wpi.edu> wrote:
Can someone explain this to my evidently inadequately caffeinated brain? I was trying to use a lower case character range wildcard to list all files not starting with an uppercase letter and I noticed it wasn't working as I'd expect. So I created this simple example and still don't understand what's happening.
Dir with two files:
brett@spider /tmp/test $ \ls apple Berry
This is what I'd expect to see:
brett@spider /tmp/test $ \ls [a-b]* apple
This makes no sense. Is this a bug?:
brett@spider /tmp/test $ \ls [a-c]* apple Berry
From here on are just a few extra examples confirming the oddity of the above.
brett@spider /tmp/test $ \ls [a]* apple
brett@spider /tmp/test $ \ls [b]* ls: cannot access [b]*: No such file or directory
brett@spider /tmp/test $ \ls [c]* ls: cannot access [c]*: No such file or directory
brett@spider /tmp/test $ \ls a* apple
brett@spider /tmp/test $ \ls b* ls: cannot access b*: No such file or directory
brett@spider /tmp/test $ \ls c* ls: cannot access c*: No such file or directory
brett@spider /tmp/test $ dpkg -S `which ls` coreutils: /bin/ls
brett@spider /tmp/test $ dpkg -s coreutils Package: coreutils Essential: yes Status: install ok installed Priority: required Section: utils Installed-Size: 6020 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: amd64 Multi-Arch: foreign Version: 8.21-1ubuntu5.1 [SNIP]
Thanks, Brett
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug