Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Apr 2017 02:13:43 -0300
From:      =?UTF-8?Q?Nilton_Jos=C3=A9_Rizzo?= <rizzo@i805.com.br>
To:        current@freebsd.org
Cc:        owner-freebsd-current@freebsd.org
Subject:   Re: problem with ls, not show a correct list
Message-ID:  <3a8b8ade882d1486aa41b448a9c83b6c@i805.com.br>
In-Reply-To: <fe2da09242ff63acb0c62dd0519cfa1f@i805.com.br>
References:  <fe2da09242ff63acb0c62dd0519cfa1f@i805.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help


   It's a terrible!!!! Is it a locale bug? Look!

% 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=
% pwd
/home2/rizzo/tmp/teste
% touch a
% touch b
% touch c
% touch d
% touch A
% touch D
% touch E
% ls -l [a-z]*
-rw-r--r--  1 rizzo  wheel  0  7 abr 02:06 a
-rw-r--r--  1 rizzo  wheel  0  7 abr 02:06 A
-rw-r--r--  1 rizzo  wheel  0  7 abr 02:06 b
-rw-r--r--  1 rizzo  wheel  0  7 abr 02:06 c
-rw-r--r--  1 rizzo  wheel  0  7 abr 02:06 d
-rw-r--r--  1 rizzo  wheel  0  7 abr 02:06 D
-rw-r--r--  1 rizzo  wheel  0  7 abr 02:06 E
% pwd && ls && pwd && ls [a-z]*  && pwd && rm [a-z]* && pwd && ls
/home2/rizzo/tmp/teste
a       A       b       c       d       D       E
/home2/rizzo/tmp/teste
a       A       b       c       d       D       E
/home2/rizzo/tmp/teste
/home2/rizzo/tmp/teste
% setenv LANG C
% locale
LANG=C
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
% pwd
/home2/rizzo/tmp/teste
% touch a
% touch b
% touch c
% touch d
% touch A
% touch D
% touch E
% pwd && ls && pwd && ls [a-z]* && pwd && rm [a-z]* && pwd && ls
/home2/rizzo/tmp/teste
A       D       E       a       b       c       d
/home2/rizzo/tmp/teste
a       b       c       d
/home2/rizzo/tmp/teste
/home2/rizzo/tmp/teste
A       D       E
%

Now, with a locale = C the substitution work fine

-- 
********************************************************
* 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?3a8b8ade882d1486aa41b448a9c83b6c>