Bug 23228

Summary: Character ranges don't work in single-byte character sets other than C
Product: Sisyphus Reporter: Andrey Rahmatullin <wrar>
Component: grepAssignee: placeholder <placeholder>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: evg, glebfm, ldv, led, mike, placeholder
Version: unstable   
Hardware: all   
OS: Linux   

Description Andrey Rahmatullin 2010-03-25 11:55:32 MSK
$ echo foo |LC_ALL=C egrep '^[a-z][a-z_0-9]+$'             
foo

$ echo foo |egrep '^[a-z][a-z_0-9]+$'      
zsh: done       echo foo | 
zsh: exit 1     egrep '^[a-z][a-z_0-9]+$'
Comment 1 Dmitry V. Levin 2010-03-25 17:40:09 MSK
It will be fixed in 2.6.1
Comment 2 Repository Robot 2010-03-25 19:23:29 MSK
grep-2.6.1-alt0.1 -> sisyphus:

* Thu Mar 25 2010 Dmitry V. Levin <ldv@altlinux> 2.6.1-alt0.1

- Updated to 2.6.1 prerelease snapshot v2.6-17-g74ab780 (closes: #23228).
Comment 3 Michael Shigorin 2010-03-25 19:51:27 MSK
Это туда же было?

$ cat /proc/stat | LC_COLLATE=en_US.UTF-8 egrep '^cpu[[:digit:]]+' /proc/stat
cpu0 39641 0 11029 101634 11400 281 243 0 0
cpu1 27475 0 48586 90130 1763 0 3 0 0
cpu2 33675 0 15007 120071 1696 0 7 0 0
cpu3 29776 0 39065 98772 1373 0 6 0 0
$ cat /proc/stat | LC_COLLATE=en_US.UTF-8 egrep '^cpu[0-9]+' /proc/stat
$ cat /proc/stat | LC_COLLATE=en_US.UTF-8 egrep '^cpu[1-2]+' /proc/stat
cpu2 34465 0 16070 128355 1701 0 7 0 0
cpu3 31309 0 45963 99936 1373 0 7 0 0
$ cat /proc/stat | LC_COLLATE=C egrep '^cpu[0-9]+' /proc/stat
cpu0 41141 0 11292 112957 11509 304 253 0 0
cpu1 28968 0 50902 99790 1763 0 3 0 0
cpu2 34755 0 16104 131568 1704 0 7 0 0
cpu3 31766 0 46380 102599 1373 0 7 0 0
$ rpm -q grep
grep-2.6-alt1
Comment 4 Dmitry V. Levin 2010-03-26 01:22:00 MSK
(In reply to comment #3)
> Это туда же было?

Да, я написал от этом в devel несколько часов назад.