[Bug 12591] New: awk requires parentheses around expressions

bugzilla at busybox.net bugzilla at busybox.net
Fri Feb 28 22:44:12 UTC 2020


https://bugs.busybox.net/show_bug.cgi?id=12591

            Bug ID: 12591
           Summary: awk requires parentheses around expressions
           Product: Busybox
           Version: 1.31.x
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
          Assignee: unassigned at busybox.net
          Reporter: wolf+busybox at wolfsden.cz
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

Following works in gawk

$ echo | awk -F. '{print $1 == 0 && $2 >= 7}'
0

however the same fails in busybox's awk

$ echo | busybox awk -F. '{print $1 == 0 && $2 >= 7}'
awk: cmd. line:1: Unexpected token

My understanding of
https://pubs.opengroup.org/onlinepubs/009695399/utilities/awk.html#tag_04_06_13_16
is that the parentheses are optional there. When you add them, it starts to
work:

$ echo | busybox awk -F. '{print ($1 == 0) && ($2 >= 7)}'
0

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list