OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
awk doesn't recognize all of EREs

From: Vadim Zhukov (persgraygmail.com)
Date: Thu Sep 04 2008 - 03:35:20 CDT


Our awk do not recognize range regex operator ("{n,m}" syntax). But man
page says:

"awk supports extended regular expressions (EREs). See re_format(7) for
more information on regular expressions."

This behavior is same as in FreeBSD. gawk recognize range operator in
POSIX mode ("--posix").

As far as I understand, either our awk should recognize range operator
(better) or this non-POSIX behavior should be mentioned in awk(1).
Sample diff for man page provided; I didn't dig deeply in code to fix it
enough yet.

--
  Best wishes,
    Vadim Zhukov

--- awk.1.orig Fri Jul 25 22:34:22 2008
+++ awk.1 Thu Sep 4 12:24:29 2008
-316,7 +316,9
 relational expressions.
 .Nm
 supports extended regular expressions
-.Pq EREs .
+.Pq EREs
+except range operator
+.Dq { n , m } .
 See
 .Xr re_format 7
 for more information on regular expressions.
-764,7 +766,7
 .Nm
 utility is compliant with the
 .St -p1003.1-2004
-specification.
+specification, except support of regular expression range operator.
 .Pp
 The flags
 .Op Fl \&dV