On 09 Mar 2022 04:10, Mike Frysinger wrote: > On 09 Mar 2022 03:54, Mike Frysinger wrote: > > On 09 Mar 2022 08:31, Sebastian Huber wrote: > > > Other awk implementations such as mawk do not support the length() function. > > > > those awk implementations are not POSIX compliant. length() is > > *not* a GNU extension. you can see it clearly defined in POSIX: > > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html#tag_20_06_13_13 > > sorry, i quoted length() as used to count bytes in a string, not elements > in an array. POSIX doesn't support that. i would still argue that, while > gawk supports it, it isn't a GNU extension. bwk supported it back in 2002, > and gawk didn't implement it until ~2005. since it's widely supported for a long time, i sent a request to the POSIX folks to just add it :) https://www.austingroupbugs.net/view.php?id=1566 -mike