3 ms·
But length() is standard POSIX, no? Even length(array) has been approved by POSIX [1] but not yet included in the spec (they're very slow to update the spec for
by benhoyt 3y ago
But length() is standard POSIX, no? Even length(array) has been approved by POSIX [1] but not yet included in the spec (they're very slow to update the spec for some reason). Both forms have been supported in onetrueawk, Gawk, mawk, and Busybox awk for a long time.
[1] https://www.austingroupbugs.net/view.php?id=1566 https://www.austingroupbugs.net/view.php?id=1566
- ryenus 3y agoAh good to know, thank you! Meanwhile I found it, it was the awk from Debian 10 that lacked `length(array)`, see the related nvm pr [1]. [1]: https://github.com/nvm-sh/nvm/pull/2917/ https://github.com/nvm-sh/nvm/pull/2917/