ok! Thanks a lot! I've written an export LC_ALL=C at the beginning of my script, and everything is fine.
:) Je la Fri, Apr 29, 2005 at 12:15:54PM +0100, Edward Catmur skribis: > On Fri, 2005-04-29 at 12:09 +0200, Lluís Batlle i Rossell wrote: > > [EMAIL PROTECTED] ~/doc/xmligo/glosa $ echo "adela G" | \ > > sed 's/^\([-A-FH-Za-z > > \?]\+\)/:\1:/' > > :adela G: > > [EMAIL PROTECTED] viric $ echo "adela G" | sed 's/^\([-A-FH-Za-z > > \?]\+\)/:\1:/' > > :adela :G > > [EMAIL PROTECTED] ~ $ echo "adela G" | sed 's/^\([-A-FH-Za-z > > \?]\+\)/:\1:/' > > :adela :G > > [EMAIL PROTECTED] viric $ echo "adela G" | sed 's/^\([-A-FH-Za-z > > \?]\+\)/:\1:/' > > :adela G: > > My sed 4.1.4, in 'llimona', is the only one compiled with "nls" USE flag. > > >From grep(1): > > > Within a bracket expression, a range expression consists of two > > charac- > > ters separated by a hyphen. It matches any single character that > > sorts > > between the two characters, inclusive, using the locale's > > collating > > sequence and character set. For example, in the default C > > locale, > > [a-d] is equivalent to [abcd]. Many locales sort characters in > > dictio- > > nary order, and in these locales [a-d] is typically not > > equivalent to > > [abcd]; it might be equivalent to [aBbCcDd], for example. To > > obtain > > the traditional interpretation of bracket expressions, you can use > > the > > C locale by setting the LC_ALL environment variable to the value C. > > Your sed program should be: 's/^\([-ABCDEFHIJKLMNOPQRSTUVWXYZ[:lower:] > \?]\+\)/:\1:/' > > > -- > gentoo-user@gentoo.org mailing list > -- +--------------------------------------------+----------------------+ | Lluís Batlle i Rossell |Tel.Olot. 972 26 71 24| | Membre de [s3os] (www.s3os.net) | BCN. 93 16 22 680| | [EMAIL PROTECTED] / ICQ# 9658637 | Mòb. 654 08 67 35| | web: http://vicerveza.homeunix.net/~viric/ | Santa Pau / Catalunya| +--------------------------------------------+----------------------+ -- gentoo-user@gentoo.org mailing list