ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Sergey Stepanov <dlagovna@mail.ru>
To: community@lists.altlinux.org
Subject: [Comm] Неправильная сортировка в консоли?
Date: Wed, 11 Oct 2006 23:49:14 +0400
Message-ID: <E1GXk4o-000AWB-00.dlagovna-mail-ru@f44.mail.ru> (raw)


Здравствуйте.

Объясните пожалуйста, почему так происходит. Имеем Master 2.4.
В неком каталоге лежит несколько файлов. Вот их имена, выведенные 
через команду 

#ls -1

backgrnd.png
barel_down.png
barel_left.png
barel_rght.png
barel_up.png
bet_eng.png
bet_esp.png
betperline_eng.png
betperline_esp.png
betperline_por.png
bet_por.png
bliki
cat_blink
cat_bottle
cat_cycle
cat_turn
circle_pl.png
console_key.tga

Обратите внимание, что в списке идут друг за другом файлы bet_eng.png
и bet_esp.png, потом betperline_*.png, а потом почему-то bet_por.png

Я попробовал вывести список в файл 

#ls -1 > ls.txt

А потом попробовал отсортировать через sort

#sort ls.txt > ls_sort.txt

Результирующий список остался прежним! Строка "bet_por.png" все равно
осталась на неправильном месте.

Я проверил строки "bet_*.png" в байт-коде (может, где-то русская буква?). Они отличаются только суффиксами "eng", "esp" и "por",
значит должны стоять друг за другом. А на деле - нет.

Скопировал файлик ls.txt на винду, дал ту же команду sort ls.txt > ls_sort.txt. Винда отсортировала правильно.

Вы можете сами попробовать отсортировать этот список, и если у вас
AltMaster 2.4, то он отсортируется неправильно.


Вопрос: в чем причина неправильной сортировки? Как исправить?


Со всяческими пожеланиями, Сергей.
http://xi.net.ru



             reply	other threads:[~2006-10-11 19:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-11 19:49 Sergey Stepanov [this message]
2006-10-11 20:13 ` Damir Shayhutdinov
2006-10-12  5:59   ` A.Kitouwaykin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1GXk4o-000AWB-00.dlagovna-mail-ru@f44.mail.ru \
    --to=dlagovna@mail.ru \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git