file globbing in now case insensitive?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

file globbing in now case insensitive?

Peter Silva

After deleting a bunch of files by mistake, I've tried this on two different ubuntu 16.04's, and it works the same, but I don't understand why.
Normally, file globbing is case sensitive. so:

blacklab% mkdir /tmp/kk
blacklab% cd /tmp/kk
blacklab% ls
blacklab% touch A b 1
blacklab% ls -al
total 1060
drwxrwxr-x  2 peter peter    4096 Apr  2 10:08 .
drwxrwxrwt 15 root  root  1081344 Apr  2 10:08 ..
-rw-rw-r--  1 peter peter       0 Apr  2 10:08 1
-rw-rw-r--  1 peter peter       0 Apr  2 10:08 A
-rw-rw-r--  1 peter peter       0 Apr  2 10:08 b
blacklab% echo [A-Z]*
A b
blacklab% 

Huh?  this should only have listed A, but I got b as well...
 what's going on?

blacklab% shopt | grep -i case
nocaseglob     off
nocasematch     off
blacklab% 

I can't do case sensitive file globbing any more... no matter what settings are applied...  this is overcoming how things have worked for 30 years... what's going on?


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
On Sun, 2 Apr 2017 10:12:32 -0400, Peter Silva wrote:

>After deleting a bunch of files by mistake, I've tried this on two
>different ubuntu 16.04's, and it works the same, but I don't
>understand why. Normally, file globbing is case sensitive. so:
>
>blacklab% mkdir /tmp/kk
>blacklab% cd /tmp/kk
>blacklab% ls
>blacklab% touch A b 1
>blacklab% ls -al
>total 1060
>drwxrwxr-x  2 peter peter    4096 Apr  2 10:08 .
>drwxrwxrwt 15 root  root  1081344 Apr  2 10:08 ..
>-rw-rw-r--  1 peter peter       0 Apr  2 10:08 1
>-rw-rw-r--  1 peter peter       0 Apr  2 10:08 A
>-rw-rw-r--  1 peter peter       0 Apr  2 10:08 b
>blacklab% echo [A-Z]*
>A b
>blacklab%
>
>Huh?  this should only have listed A, but I got b as well...
> what's going on?
>
>blacklab% shopt | grep -i case
>nocaseglob     off
>nocasematch     off
>blacklab%
>
>I can't do case sensitive file globbing any more... no matter what
>settings are applied...  this is overcoming how things have worked for
>30 years... what's going on?

[rocketmouse@archlinux test]$ ls
A  b
[rocketmouse@archlinux test]$ echo [a-z]
A b
[rocketmouse@archlinux test]$ echo [[:lower:]]
b

"[snip]
 @barlop: The behavior of character ranges depends on the locale,
specifically the LC_COLLATE setting In some (many?) locales, [a-z]
includes "aAbB...yYz" but not "Z". You can enable extended globbing
using shopt -s extglob. I get different results for [a-z] and
[[:lower:]] on Cygwin. – Dennis Williamson Mar 1 '11 at 14:44 add a

It's not regexp, which is where the confusion comes in. Instead, it
uses a system called "globbing" - see:

$ man 7 glob

Instead of [a-z] you need to use [[:lower:]] as such:

$ ls -d [[:lower:]]*

[snip]"
- https://superuser.com/questions/251777/ls-or-regex-is-case-insensitive

--
"Michael" described Floyd as "an idiot savant", and added, "Give him
any two numbers, and he can multiply them in his head, just like that."
Homer, testing Floyd, said, "Five times nine", and Floyd instantly
responded "Forty-five", which impressed Homer.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
> On Sun, 2 Apr 2017 10:12:32 -0400, Peter Silva wrote:
> > blacklab% echo [A-Z]*
> > A b

[rocketmouse@archlinux test]$ ls
A  b
[rocketmouse@archlinux test]$ echo [[:upper:]]
A


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Colin Watson
In reply to this post by Ralf Mardorf-2
On Sun, Apr 02, 2017 at 05:56:29PM +0200, Ralf Mardorf wrote:

>  @barlop: The behavior of character ranges depends on the locale,
> specifically the LC_COLLATE setting In some (many?) locales, [a-z]
> includes "aAbB...yYz" but not "Z". You can enable extended globbing
> using shopt -s extglob. I get different results for [a-z] and
> [[:lower:]] on Cygwin. – Dennis Williamson Mar 1 '11 at 14:44 add a
>
> It's not regexp, which is where the confusion comes in. Instead, it
> uses a system called "globbing" - see:
>
> $ man 7 glob
>
> Instead of [a-z] you need to use [[:lower:]] as such:

Or just export LC_COLLATE=C.UTF-8.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
On Sun, 2 Apr 2017 17:29:35 +0100, Colin Watson wrote:
>Or just export LC_COLLATE=C.UTF-8.

You not necessarily need to export it. However, this works for Ubuntu...

[root@moonstudio tmp]# grep PRETTY /etc/os-release
PRETTY_NAME="Ubuntu 16.04.2 LTS"
[root@moonstudio tmp]# locale -a | grep C
C
C.UTF-8
[root@moonstudio tmp]# ls
A  b
[root@moonstudio tmp]# LC_COLLATE=C echo [A-Z]*
A
[root@moonstudio tmp]# LC_COLLATE=C.UTF-8 echo [A-Z]*
A

...but isn't portable. On Arch Linux...

[root@archlinux test]# grep PRETTY /etc/os-release
PRETTY_NAME="Arch Linux"
[root@archlinux test]# locale -a | grep C
C
[root@archlinux test]# ls
A  b
[root@archlinux test]# LC_COLLATE=C echo [A-Z]*
A b

...it doesn't work. So if the OP should need it for command line on
Ubuntu only, it's ok, but for a portable script it might not do the job.

Regards,
Ralf





--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Colin Watson
On Sun, Apr 02, 2017 at 07:09:45PM +0200, Ralf Mardorf wrote:
> On Sun, 2 Apr 2017 17:29:35 +0100, Colin Watson wrote:
> >Or just export LC_COLLATE=C.UTF-8.
>
> You not necessarily need to export it.

Certainly, although most people who ask this question want it to work
for subprocesses as well as just the current shell.

> However, this works for Ubuntu...
>
> [root@moonstudio tmp]# grep PRETTY /etc/os-release
> PRETTY_NAME="Ubuntu 16.04.2 LTS"
> [root@moonstudio tmp]# locale -a | grep C
> C
> C.UTF-8
> [root@moonstudio tmp]# ls
> A  b
> [root@moonstudio tmp]# LC_COLLATE=C echo [A-Z]*
> A
> [root@moonstudio tmp]# LC_COLLATE=C.UTF-8 echo [A-Z]*
> A
>
> ...but isn't portable. On Arch Linux...

The above constructions aren't so much unportable as simply wrong,
though!  (I think perhaps they seemed to work for you because your
initial locale was set up a little differently on Ubuntu.)  The reason
is a bit subtle.  Shell parsing is far more complex than is good for
anyone, and so I'll simplify a lot for the sake of brevity; you can find
a more complete but also much longer description in your shell's manual
page.  For instance, the "SIMPLE COMMAND EXPANSION" section in bash(1)
covers this.

A command line such as this:

  LC_COLLATE=C echo [A-Z]*

... is processed by the shell first by splitting it into words.
Variable assignments are *not* processed immediately, but are saved for
later.  The other words undergo a series of expansions.  The last
expansion performed is pathname expansion, which turns [A-Z]* into a
sorted list of filenames matching that pattern, with both the matching
and the sorting being locale-dependent [1].  *After* this has been done,
the right-hand side of each variable assignment itself undergoes various
expansions and the result is assigned to the variable.

[1] There are even further subtleties.  Whether any of this is
    locale-dependent itself depends on the shell.  For example, I don't
    think dash(1)'s pathname expansion behaves this way.

Your example therefore does not work because LC_COLLATE is not set to C
until after [A-Z]* has been expanded.  If you're trying to construct
something that sets this for just a single command, then a correct
version would be:

  (LC_COLLATE=C; echo [A-Z]*)

(Of course using a subshell may have other effects.  Again, it's often
simpler just to export LC_COLLATE early on and be done with it.)


When it comes to C.UTF-8, *that* indeed is unportable.  It's become more
widespread, and it's an obvious useful extension of the C locale to the
full range of UTF-8 codepoints, so I hope eventually it'll make it into
glibc upstream and be available pretty much everywhere, but in the
meantime it's true that we have to put up with it not necessarily being
available.  If you have systems where this is relevant then your best
bet is probably to go for LC_COLLATE=C and accept that odd things may
happen if you have file names containing non-ASCII characters.


Another thing you can do instead of all this, if you can rely on bash
4.3 or above, is:

  shopt -s globasciiranges

This doesn't make [A-Z] match other upper-case letters such as Á (you
really do need something like [[:upper:]] for that), but if you happen
to only care about ASCII then it may be good enough.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Joel Rees
In reply to this post by Ralf Mardorf-2
On Mon, Apr 3, 2017 at 2:09 AM, Ralf Mardorf <[hidden email]> wrote:

> On Sun, 2 Apr 2017 17:29:35 +0100, Colin Watson wrote:
>>Or just export LC_COLLATE=C.UTF-8.
>
> You not necessarily need to export it. However, this works for Ubuntu...
>
> [root@moonstudio tmp]# grep PRETTY /etc/os-release
> PRETTY_NAME="Ubuntu 16.04.2 LTS"
> [root@moonstudio tmp]# locale -a | grep C
> C
> C.UTF-8
> [root@moonstudio tmp]# ls
> A  b
> [root@moonstudio tmp]# LC_COLLATE=C echo [A-Z]*
> A
> [root@moonstudio tmp]# LC_COLLATE=C.UTF-8 echo [A-Z]*
> A
>
> ...but isn't portable. On Arch Linux...
>
> [root@archlinux test]# grep PRETTY /etc/os-release
> PRETTY_NAME="Arch Linux"
> [root@archlinux test]# locale -a | grep C
> C
> [root@archlinux test]# ls
> A  b
> [root@archlinux test]# LC_COLLATE=C echo [A-Z]*

... but, what about "LC_COLLATE=C.UTF-8" on arclinux?

(Is default C locale different from UTF-8 C locale on archlinux,
perhaps? (Actually, I'd kind of hope not.)

And I guess the locale for globbing would sort of make sense if the
range [A-z] proves to be equivalent to [:alpha:].

> A b
>
> ...it doesn't work. So if the OP should need it for command line on
> Ubuntu only, it's ok, but for a portable script it might not do the job.
>
> Regards,
> Ralf



--
Joel Rees

I'm imagining I'm a novelist:
http://joel-rees-economics.blogspot.com/2017/01/soc500-00-00-toc.html
More of my delusions:
http://reiisi.blogspot.jp/p/novels-i-am-writing.html

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
In reply to this post by Colin Watson
On Mon, 3 Apr 2017 00:42:29 +0100, Colin Watson wrote:
>Your example therefore does not work because LC_COLLATE is not set to C
>until after [A-Z]* has been expanded.  If you're trying to construct
>something that sets this for just a single command, then a correct
>version would be:
>
>  (LC_COLLATE=C; echo [A-Z]*)

Aha!

Why isn't it needed for LANG?

[rocketmouse@archlinux test]$ LANG=de_DE.utf8 mate-calc

[root@archlinux test]# grep PRETTY /etc/os-release
PRETTY_NAME="Arch Linux"
[root@archlinux test]# locale -a | grep C
C
[root@archlinux test]# ls
A  b
[root@archlinux test]# (LC_COLLATE=C; echo [A-Z]*)
A
[root@archlinux test]# shopt | grep globasciiranges
globasciiranges off
[root@archlinux test]# shopt | grep -i case
nocaseglob     off
nocasematch     off

I'm running Ubuntu in a systemd-nspawn container...

[root@moonstudio test]# grep PRETTY /etc/os-release
PRETTY_NAME="Ubuntu 16.04.2 LTS"
[root@moonstudio test]# locale -a | grep C
C
C.UTF-8
[root@moonstudio test]# ls
A  b
[root@moonstudio test]# echo [A-Z]*
A
[root@moonstudio test]# shopt | grep globasciiranges
globasciiranges off
[root@moonstudio test]# shopt | grep -i case
nocaseglob     off
nocasematch     off

...so I suspect it works related to:

[root@moonstudio test]# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
[root@moonstudio test]# locale -a
C
C.UTF-8
POSIX
de_DE
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
de_DE@euro
deutsch
en_GB
en_GB.iso88591
en_GB.utf8
en_US.utf8
german

Arch Linux:

[root@archlinux test]# locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
[root@archlinux test]# locale -a
C
de_DE
de_DE@euro
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
deutsch
en_GB
en_GB.iso88591
en_GB.utf8
en_US.utf8
german
POSIX

[root@archlinux test]# ls
A  b
[root@archlinux test]# (LC_COLLATE=POSIX; echo [A-Z]*)
A

Regards,
Ralf


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
In reply to this post by Joel Rees
On Mon, 3 Apr 2017 08:53:30 +0900, Joel Rees wrote:
>... but, what about "LC_COLLATE=C.UTF-8" on arclinux?

There is no C.UTF-8.

Regards,
Ralf


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
In reply to this post by Ralf Mardorf-2
On Mon, 3 Apr 2017 10:26:08 +0200, Ralf Mardorf wrote:
>Why isn't it needed for LANG?
>
>[rocketmouse@archlinux test]$ LANG=de_DE.utf8 mate-calc

I suspect because "mate-calc" is a program and "echo" is build in bash?!


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
On Mon, 3 Apr 2017 10:29:51 +0200, Ralf Mardorf wrote:
>On Mon, 3 Apr 2017 10:26:08 +0200, Ralf Mardorf wrote:
>>Why isn't it needed for LANG?
>>
>>[rocketmouse@archlinux test]$ LANG=de_DE.utf8 mate-calc  
>
>I suspect because "mate-calc" is a program and "echo" is build in
>bash?!

I guess now I understand, the culprit is "[A-Z]*" :D.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
In reply to this post by Ralf Mardorf-2
On Mon, 3 Apr 2017 10:26:08 +0200, Ralf Mardorf wrote:
>I'm running Ubuntu in a systemd-nspawn container...

...but I didn't use the -b option.

Btw. by the nature of the container some things don't work, even when
using -b, e.g. installing grub or updating makedev.

[root@archlinux rocketmouse]# systemd-nspawn -bqD /mnt/moonstudio
[root@moonstudio weremouse]# locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

[root@archlinux rocketmouse]# systemd-nspawn -qD /mnt/moonstudio
[root@moonstudio ~]# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Colin Watson
In reply to this post by Ralf Mardorf-2
On Mon, Apr 03, 2017 at 10:26:08AM +0200, Ralf Mardorf wrote:

> On Mon, 3 Apr 2017 00:42:29 +0100, Colin Watson wrote:
> >Your example therefore does not work because LC_COLLATE is not set to C
> >until after [A-Z]* has been expanded.  If you're trying to construct
> >something that sets this for just a single command, then a correct
> >version would be:
> >
> >  (LC_COLLATE=C; echo [A-Z]*)
>
> Aha!
>
> Why isn't it needed for LANG?

LC_COLLATE overrides LANG for that locale category, so there's no need
to do anything to LANG if you're setting LC_COLLATE.

> I'm running Ubuntu in a systemd-nspawn container...
[...]
> [root@moonstudio test]# locale
> LANG=
> LANGUAGE=
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"

Right.  If you want a matching test, then, "export LANG=en_US.UTF-8" in
this container before you start.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
>  (LC_COLLATE=C; echo [A-Z]*)  
     Btw. since ^this does the trick ;) the OP could run
   
       LC_COLLATE=C; echo [A-Z]*

     without the parentheses, assuming exporting should be unwanted.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Tom H-4
In reply to this post by Ralf Mardorf-2
On Mon, Apr 3, 2017 at 4:27 AM, Ralf Mardorf <[hidden email]> wrote:
> On Mon, 3 Apr 2017 08:53:30 +0900, Joel Rees wrote:
>>
>> ... but, what about "LC_COLLATE=C.UTF-8" on arclinux?
>
> There is no C.UTF-8.

[OT]

It'll come to Arch one day or another.

There's a Fedora patch

https://src.fedoraproject.org/cgit/rpms/glibc.git/tree/glibc-c-utf8-locale.patch

that, AFAIK, has been proposed upstream

https://sourceware.org/bugzilla/show_bug.cgi?id=17318

And there's a Debian patch that's inherited in Ubuntu

https://anonscm.debian.org/cgit/pkg-glibc/glibc.git/tree/debian/patches/localedata/locale-C.diff

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Colin Watson
In reply to this post by Ralf Mardorf-2
On Mon, Apr 03, 2017 at 03:32:52PM +0200, Ralf Mardorf wrote:
> >  (LC_COLLATE=C; echo [A-Z]*)  
>      Btw. since ^this does the trick ;) the OP could run
>    
>        LC_COLLATE=C; echo [A-Z]*
>
>      without the parentheses, assuming exporting should be unwanted.

Which is fine as far as it goes, but of course leaves that LC_COLLATE
setting in place for subsequent commands.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: file globbing in now case insensitive?

Ralf Mardorf-2
On Tue, 2017-04-04 at 10:03 +0100, Colin Watson wrote:

> On Mon, Apr 03, 2017 at 03:32:52PM +0200, Ralf Mardorf wrote:
> > >  (LC_COLLATE=C; echo [A-Z]*)  
> >      Btw. since ^this does the trick ;) the OP could run
> >    
> >        LC_COLLATE=C; echo [A-Z]*
> >
> >      without the parentheses, assuming exporting should be unwanted.
>
> Which is fine as far as it goes, but of course leaves that LC_COLLATE
> setting in place for subsequent commands.

Oops :D

good point! This way it's quasi a "mini-export" ;).

Regards,
Ralf


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Loading...