busybox awk doesn't allow print statements in for loop head

Oğuz oguzismailuysal at gmail.com
Mon Oct 30 06:38:17 UTC 2023


Reproduce by:

     busybox awk 'BEGIN{for(print 5;0;);}'

POSIX allows a print statement on both sides of the loop condition, so
this should print 5 (and does so with GNU awk). But it fails with this
error message instead:

    awk: cmd. line:1: Unexpected token


More information about the busybox mailing list