[BusyBox 0000914]: awk/gawk incompatibility: busybox includes POSIX interval expressions by default
bugs at busybox.net
bugs at busybox.net
Tue Jun 20 23:18:42 UTC 2006
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=914
======================================================================
Reported By: vda2
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 914
Category: Documentation
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Resolution: won't fix
Fixed in Version:
======================================================================
Date Submitted: 06-20-2006 08:47 PDT
Last Modified: 06-20-2006 16:18 PDT
======================================================================
Summary: awk/gawk incompatibility: busybox includes POSIX
interval expressions by default
Description:
bbox's awk -f <this file> says: "awk: xregcomp: Unmatched \{"
gawk-3.0.4 doesn't
======================================================================
----------------------------------------------------------------------
vapier - 06-20-06 16:18
----------------------------------------------------------------------
this is because gawk's default regular expression support includes all
POSIX expressions *except* interval expressions
busybox's regular expression support includes all POSIX expressions
including internal expressions ... which means you need to escape the {
if you read the SUSv3 standards, busybox's behavior is compliant:
http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html
http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html#tag_04_06_13_04
* Regular Expressions
The awk utility shall make use of the extended regular expression
notation (see the Base Definitions volume of IEEE Std 1003.1-2001, Section
9.4, Extended Regular Expressions)
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04_03
The asterisk, plus-sign, question-mark, and left-brace shall be special
except when used in a bracket expression.
and in fact, the standard says that doing '\{' should always result in
matching of a '{'
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_03_02
so, since you arent using [{], and you arent using '\{', your code is not
portable and busybox makes no promise that it will work
Issue History
Date Modified Username Field Change
======================================================================
06-20-06 08:47 vda2 New Issue
06-20-06 08:47 vda2 Status new => assigned
06-20-06 08:47 vda2 Assigned To => BusyBox
06-20-06 08:47 vda2 File Added: addsym.awk
06-20-06 09:15 vda Issue Monitored: vda
06-20-06 16:18 vapier Note Added: 0001436
06-20-06 16:18 vapier Status assigned => closed
06-20-06 16:18 vapier Resolution open => won't fix
06-20-06 16:18 vapier Summary awk/gawk incompatibility
(testcase included) => awk/gawk incompatibility: busybox includes POSIX interval
expressions by default
======================================================================
More information about the busybox-cvs
mailing list