From owner-freebsd-current@freebsd.org Sun Apr 9 16:32:09 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECE85D36FC2; Sun, 9 Apr 2017 16:32:09 +0000 (UTC) (envelope-from rizzo@i805.com.br) Received: from server.i805.com.br (mailhost.i805.com.br [50.7.9.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "fbsd10.amd64", Issuer "fbsd10.amd64" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BE543DB3; Sun, 9 Apr 2017 16:32:09 +0000 (UTC) (envelope-from rizzo@i805.com.br) Received: from server.i805.com.br (localhost [127.0.0.1]) by server.i805.com.br (8.15.2/8.15.2) with ESMTPS id v39GVos6030182 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 9 Apr 2017 13:31:51 -0300 (BRT) (envelope-from rizzo@i805.com.br) Received: (from www@localhost) by server.i805.com.br (8.15.2/8.15.2/Submit) id v39GVnpZ030181; Sun, 9 Apr 2017 13:31:49 -0300 (BRT) (envelope-from rizzo@i805.com.br) X-Authentication-Warning: server.i805.com.br: www set sender to rizzo@i805.com.br using -f To: Andrey Chernov Subject: Re: problem with ls, not show a correct list X-PHP-Script: www.i805.com.br/roundcube/index.php for 186.221.219.53 X-PHP-Originating-Script: 80:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sun, 09 Apr 2017 13:31:48 -0300 From: =?UTF-8?Q?Nilton_Jos=C3=A9_Rizzo?= Cc: Toomas Soome , Allan Jude , FreeBSD Current , owner-freebsd-current@freebsd.org In-Reply-To: References: <25969d2c-6857-77a4-86a4-08b22f15cbfe@freebsd.org> <7a08478e-ee7c-70f6-1b52-bb966f47c594@freebsd.org> <1ba4fb7aa090271be631f01e9f72d844@i805.com.br> Message-ID: X-Sender: rizzo@i805.com.br User-Agent: Roundcube Webmail/1.2.3 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on server.i805.com.br X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 16:32:10 -0000 Em 2017-04-09 00:26, Andrey Chernov escreveu: > On 07.04.2017 23:20, Nilton José Rizzo wrote: >> Em 2017-04-07 05:51, Toomas Soome escreveu: >>>> On 7. apr 2017, at 11:29, Andrey Chernov 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!!!! > > I see no error. You do not include Z into [a-z] expression above, so > why > you expect it is unknown. > >> I lower- equal a upper-case why Z not show in this list? > > No, it is not case-equal sorting. As I already mention, it is > dictionaries sorting, letters considered first, their case - next (and > maybe many other factors for non-ASCII - next). > >> image when a admin use like thinks some rm -rf /*/[A-Z]* > > Admin should either run C or US-ASCII locale or do not use a-z ranges > without knowing sorting on his locale. > > I see no errors in your sh examples. try this ls [a-b,k-m] in sh using the locale setting to pt_BR.UTF-8 it's not work # 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 [[:lower:]][a-c,k-m]* aa # ls a b d f j m p t x A B D g k M q u y aa c e h K n r v z Aa C E i l o s w Z # It's not show the correct list, this commant MUST BE SHOW like a C locale # locale LANG=C LC_CTYPE="C" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL= # ls [a-c,k-m]* a aa b c k l m # ls [[:lower:]][a-c,k-m]* aa # When I try to use the poor workaround [[:lower:]] or [[:upper:]] this have too different behavior. The list replacement not work properly Note, I know that Unicode have some differents, but when tha basic list replacement and other basic default behavior must be preserved. > > In general it was decided (not by me) to use CLDR collation since it is > able to stable sort all Unicode chars. > It's a great problema yes!, the default shell in FreeBSD to user root in fresh new installation is csh, look the passwd file root:*:0:0::0:0:Charlie &:/root:/bin/csh and it's will be great problem because all man pages with trate a list substitution not say anything about this. > > _______________________________________________ > 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 * ********************************************************