ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] grep: bug in UTF8 locale?
@ 2008-07-24 11:03 Slava Semushin
  2008-07-24 11:11 ` Denis Nazarov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Slava Semushin @ 2008-07-24 11:03 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

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

[c0der@xxx ~]$ echo "test" | grep '^[a-z]'
test
[c0der@xxx ~]$ echo "Test" | grep '^[a-z]'
Test
[c0der@xxx ~]$ echo "Test" | LANG=C grep '^[a-z]'
[c1der@xxx ~]$

Локаль ru_RU.UTF-8, grep-2.5.1a-alt3

Это баг?!

-- 
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [sisyphus] grep: bug in UTF8 locale?
  2008-07-24 11:03 [sisyphus] grep: bug in UTF8 locale? Slava Semushin
@ 2008-07-24 11:11 ` Denis Nazarov
  2008-07-24 11:16   ` Slava Semushin
  2008-07-24 11:11 ` Slava Semushin
  2008-07-24 11:12 ` Denis Nazarov
  2 siblings, 1 reply; 6+ messages in thread
From: Denis Nazarov @ 2008-07-24 11:11 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

В сообщении от Thursday 24 July 2008 17:03:27 Slava Semushin написал(а):
> Здравствуйте!
>
> [c0der@xxx ~]$ echo "test" | grep '^[a-z]'
> test
> [c0der@xxx ~]$ echo "Test" | grep '^[a-z]'
> Test
> [c0der@xxx ~]$ echo "Test" | LANG=C grep '^[a-z]'
> [c1der@xxx ~]$
>
> Локаль ru_RU.UTF-8, grep-2.5.1a-alt3
>
> Это баг?!

[denis@buka ~]$ LANG=C echo "Test" | grep '^[a-z]'
Test



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [sisyphus] grep: bug in UTF8 locale?
  2008-07-24 11:03 [sisyphus] grep: bug in UTF8 locale? Slava Semushin
  2008-07-24 11:11 ` Denis Nazarov
@ 2008-07-24 11:11 ` Slava Semushin
  2008-07-24 11:12 ` Denis Nazarov
  2 siblings, 0 replies; 6+ messages in thread
From: Slava Semushin @ 2008-07-24 11:11 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

2008/7/24 Slava Semushin <slava.semushin / gmail.com>:
[...]
> Это баг?!

Quick self reply: https://bugzilla.altlinux.org/show_bug.cgi?id=13870


-- 
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [sisyphus] grep: bug in UTF8 locale?
  2008-07-24 11:03 [sisyphus] grep: bug in UTF8 locale? Slava Semushin
  2008-07-24 11:11 ` Denis Nazarov
  2008-07-24 11:11 ` Slava Semushin
@ 2008-07-24 11:12 ` Denis Nazarov
  2 siblings, 0 replies; 6+ messages in thread
From: Denis Nazarov @ 2008-07-24 11:12 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

В сообщении от Thursday 24 July 2008 17:03:27 Slava Semushin написал(а):
> Здравствуйте!
>
> [c0der@xxx ~]$ echo "test" | grep '^[a-z]'
> test
> [c0der@xxx ~]$ echo "Test" | grep '^[a-z]'
> Test
> [c0der@xxx ~]$ echo "Test" | LANG=C grep '^[a-z]'
> [c1der@xxx ~]$
>
> Локаль ru_RU.UTF-8, grep-2.5.1a-alt3
>
> Это баг?!

[denis@buka ~]$ echo "Test" | LANG=C
bash: echo: ошибка записи: Обрыв канала


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [sisyphus] grep: bug in UTF8 locale?
  2008-07-24 11:11 ` Denis Nazarov
@ 2008-07-24 11:16   ` Slava Semushin
  2008-07-24 11:18     ` Denis Nazarov
  0 siblings, 1 reply; 6+ messages in thread
From: Slava Semushin @ 2008-07-24 11:16 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

24 июля 2008 г. 18:11 пользователь Denis Nazarov <marsden / mail.ru> написал:
> [denis@buka ~]$ LANG=C echo "Test" | grep '^[a-z]'
> Test

Здесь вы запустили echo в локали С, а grep запустится с вашей локалью.
Поэтому результат и не изменился.

>[denis@buka ~]$ echo "Test" | LANG=C
>bash: echo: ошибка записи: Обрыв канала

Здесь видим, что вы не очень понимаете как работает и что делает LANG=C ;)
После пайпа должна быть команда, а LANG=C это не команда это установка
переменной окружения.


-- 
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [sisyphus] grep: bug in UTF8 locale?
  2008-07-24 11:16   ` Slava Semushin
@ 2008-07-24 11:18     ` Denis Nazarov
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Nazarov @ 2008-07-24 11:18 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

В сообщении от Thursday 24 July 2008 17:16:39 Slava Semushin написал(а):
> 24 июля 2008 г. 18:11 пользователь Denis Nazarov <marsden / mail.ru> 
написал:
> > [denis@buka ~]$ LANG=C echo "Test" | grep '^[a-z]'
> > Test
>
> Здесь вы запустили echo в локали С, а grep запустится с вашей локалью.
> Поэтому результат и не изменился.
>
> >[denis@buka ~]$ echo "Test" | LANG=C
> >bash: echo: ошибка записи: Обрыв канала
>
> Здесь видим, что вы не очень понимаете как работает и что делает LANG=C
> ;) После пайпа должна быть команда, а LANG=C это не команда это
> установка переменной окружения.

sorry, сразу не понял в чем прикол :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-24 11:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-24 11:03 [sisyphus] grep: bug in UTF8 locale? Slava Semushin
2008-07-24 11:11 ` Denis Nazarov
2008-07-24 11:16   ` Slava Semushin
2008-07-24 11:18     ` Denis Nazarov
2008-07-24 11:11 ` Slava Semushin
2008-07-24 11:12 ` Denis Nazarov

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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