Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jan 2010 23:26:54 -0800
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        Michel Talon <talon@lpthe.jussieu.fr>
Cc:        hackers@freebsd.org
Subject:   Re: User error or awk bug?
Message-ID:  <A0D6E06F-FCC0-45AE-BEAB-41B48E92B7E7@gmail.com>
In-Reply-To: <20100115213546.GA39730@lpthe.jussieu.fr>
References:  <20100115213546.GA39730@lpthe.jussieu.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 15, 2010, at 1:35 PM, Michel Talon wrote:

> awk doesn't use perl or python type regular expressions but much
> simpler ones, called "extended". Your constructs are managed by Gnu =
awk
> with the --posix option only. The following achieves what you want in=20=

> a simpler way
>=20
>=20
> niobe% echo "/"|awk 'gsub(/\/+/,"/")'
> /
> niobe% echo "//"|awk 'gsub(/\/+/,"/")'
> /

Someone else on the gawk list provided me with the answer: awk doesn't =
support POSIX regexp intervals, even though the spec says awk should. =
His assumption was the fact that awk uses {} for separating control =
statements, but I'm not sure if that's true or not.

Thanks!
-Garrett=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A0D6E06F-FCC0-45AE-BEAB-41B48E92B7E7>