[Bug 8371] New: awk: missing support for length function w/out paren

bugzilla at busybox.net bugzilla at busybox.net
Sun Sep 27 06:41:20 UTC 2015


           Summary: awk: missing support for length function w/out paren
           Product: Busybox
           Version: unspecified
          Platform: PC
               URL: http://http://pubs.opengroup.org/onlinepubs/9699919799
        OS/Version: Other
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Standard Compliance
        AssignedTo: unassigned at busybox.net
        ReportedBy: vapier at gentoo.org
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0

POSIX allows for calling the length function w/out any parentheses:

Return the length, in characters, of its argument taken as a string, or of the
whole record, $0, if there is no argument.

simple testcase:
$ echo asdf | gawk '{print length}'
$ echo asdf | busybox awk '{print length}'
awk: cmd. line:1: Unexpected token

it does support the implicit $0, but only when () are used:
$ echo asdf | busybox awk '{print length()}'

Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the busybox-cvs mailing list