Date: Fri, 07 Apr 2017 17:20:46 -0300 From: =?UTF-8?Q?Nilton_Jos=C3=A9_Rizzo?= <rizzo@i805.com.br> To: Toomas Soome <tsoome@me.com> Cc: Andrey Chernov <ache@freebsd.org>, Allan Jude <allanjude@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>, owner-freebsd-current@freebsd.org Subject: Re: problem with ls, not show a correct list Message-ID: <1ba4fb7aa090271be631f01e9f72d844@i805.com.br> In-Reply-To: <A332BA67-E71E-4CDF-AB98-241A802F8EFA@me.com> References: <fe2da09242ff63acb0c62dd0519cfa1f@i805.com.br> <25969d2c-6857-77a4-86a4-08b22f15cbfe@freebsd.org> <c0b1548a69d63a72ea73a299e55a0be9@i805.com.br> <7a08478e-ee7c-70f6-1b52-bb966f47c594@freebsd.org> <A332BA67-E71E-4CDF-AB98-241A802F8EFA@me.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Em 2017-04-07 05:51, Toomas Soome escreveu:
>> On 7. apr 2017, at 11:29, Andrey Chernov <ache@freebsd.org> wrote:
>>
>>> Hi Allan, the ls show all files without case match
>>>
>>> ls [a-z]*
>>>
>>> show all files beginning with a and A like this [aA-zZ]*
>>
>> No, last "Z" is not included.
Look this, it's a great error!!!!
% foreach d ( a b c d e f g h i j k l m n o p q r s t u v x z w y A B C
D E K M Z )
foreach? touch $d
foreach? end
% locale
LANG=pt_BR.UTF-8
LC_CTYPE="pt_BR.UTF-8"
LC_COLLATE="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_MONETARY="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_ALL=
% ls [a-z]
a c e h K n r v z
A C E i l o s w
b d f j m p t x
B D g k M q u y
% setenv LANG C
% ls [a-z]
a d g j m p s v y
b e h k n q t w z
c f i l o r u x
% ls [A-Z]
A B C D E K M Z
% setenv LANG pt_BR.UTF-8
% ls [A-Z]
A C E i l o s w Z
b d f j m p t x
B D g k M q u y
c e h K n r v z
%
I lower- equal a upper-case why Z not show in this list?
image when a admin use like thinks some rm -rf /*/[A-Z]*
it's no make a sense!!!!
Why, I only change a charmap and all my world change!
in SH have poor workaround thas not work, if i need this
% ls [a-b,k-m]
a A b k K l m
% setenv LANG C
% ls [a-b,k-m]
a b k l m
%
try to do this in sh, with [[:lower:]] or [[:upper:]] , not work
it's greater error of implements
Ok, it's not a pure ASCII char, but it's must be treated like this
>>
>
> This is to define set of chars: { a, A-z, Z } ? A-z of course does not
> make any sense;) Of course note that in few locales z is sorted after
> s, meaning that list like that can be rather short;)
>
> rgds,
> toomas
>
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to
> "freebsd-current-unsubscribe@freebsd.org"
--
********************************************************
* Nilton José Rizzo Sistema de Informação UFRRJ *
* http://cursos.ufrrj.br/grad/sistemas/ *
* lattes:http://lattes.cnpq.br/0079460703536198 *
********************************************************
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1ba4fb7aa090271be631f01e9f72d844>
