Re: awk gsub problem

2010-09-20 Thread Eric Blake
On 09/19/2010 02:33 PM, Lee wrote: If LANG is "en_US" or "en_US.utf8", then the regular expression "[a-z]" does *not* correspond anymore to the ASCII codes. Rather it corresponds to something like "[aAbBcCdD...zZ]", independent of the actual character encoding ISO-8859-1 or UTF-8. In glibc, [a

Re: awk gsub problem

2010-09-19 Thread Greg Chicares
On 2010-09-19 20:33Z, Lee wrote: > [...awk character ranges are locale-sensitive...] > > Was the reply from the upstream maintainer answered on a mailing list? > (& if so, which one?) I'd like to understand the problem they're > solving.. I get the idea of "[[:lower:]]" working regardless of >

Re: awk gsub problem

2010-09-19 Thread Dirk Fassbender
Am 19.09.2010 22:33, schrieb Lee: Thank you - I appreciate the follow-up. Was the reply from the upstream maintainer answered on a mailing list? (& if so, which one?) I'd like to understand the problem they're solving.. I get the idea of "[[:lower:]]" working regardless of collating order

Re: awk gsub problem

2010-09-19 Thread Lee
On 9/18/10, Corinna Vinschen wrote: > On Sep 18 11:21, Corinna Vinschen wrote: >> On Sep 17 22:30, Lee wrote: >> > On 9/16/10, Corinna Vinschen wrote: >> > > On Sep 15 18:30, Lee wrote: >> > >> I don't know if this is just a problem with the cygwin version of >> > >> awk, >> > >> me misunderstandin

Re: awk gsub problem

2010-09-18 Thread Corinna Vinschen
On Sep 18 11:21, Corinna Vinschen wrote: > On Sep 17 22:30, Lee wrote: > > On 9/16/10, Corinna Vinschen wrote: > > > On Sep 15 18:30, Lee wrote: > > >> I don't know if this is just a problem with the cygwin version of awk, > > >> me misunderstanding something or what, but it looks like gsub isn't >

Re: awk gsub problem

2010-09-18 Thread Corinna Vinschen
On Sep 17 22:30, Lee wrote: > On 9/16/10, Corinna Vinschen wrote: > > On Sep 15 18:30, Lee wrote: > >> I don't know if this is just a problem with the cygwin version of awk, > >> me misunderstanding something or what, but it looks like gsub isn't > >> working correctly in awk: > >> $ sh /tmp/test.a

Re: awk gsub problem

2010-09-17 Thread Lee
On 9/16/10, Corinna Vinschen wrote: > On Sep 15 18:30, Lee wrote: >> I don't know if this is just a problem with the cygwin version of awk, >> me misunderstanding something or what, but it looks like gsub isn't >> working correctly in awk: >> $ sh /tmp/test.awk >> s= ::0:: should = ::S0:: >> >> $

Re: awk gsub problem

2010-09-16 Thread Corinna Vinschen
On Sep 15 18:30, Lee wrote: > I don't know if this is just a problem with the cygwin version of awk, > me misunderstanding something or what, but it looks like gsub isn't > working correctly in awk: > $ sh /tmp/test.awk > s= ::0:: should = ::S0:: > > $ cat /tmp/test.awk > awk ' > BEGIN { > s="S

awk gsub problem

2010-09-15 Thread Lee
I don't know if this is just a problem with the cygwin version of awk, me misunderstanding something or what, but it looks like gsub isn't working correctly in awk: $ sh /tmp/test.awk s= ::0:: should = ::S0:: $ cat /tmp/test.awk awk ' BEGIN { s="Serial0" gsub("[a-z]","",s) printf("s= ::%s::