awk gsub problem

Greg Chicares
Mon Sep 20 04:46:00 GMT 2010

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
> collating order of the current char set, but how "[a-z]" gets
> translated to something like "[aAbBcCdD...zZ]" boggles my mind.  It
> seems like they had to have gone out of their way to translate [a-z]
> into a case-insensitive RE.

Discussed here:

And here's the same 'aAbBcC' question for 'ls' on solaris:
It's not specific to gawk.

>    --traditional
>       Traditional Unix awk regular expressions are matched.  The GNU
> operators are not special, interval expressions are not available, and
> neither are the POSIX character classes ([[:alnum:]] and so on).

That option doesn't override the locale; to do that, see:

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list