Busybox awk is the only awk which fails in the following: ?1[steffen@essex tmp]$ AWK='/bin/busybox awk' mdocmx.sh -vv < /home/steffen/src/nail.git/nail.1 2>/dev/null | openssl sha1 (stdin)= 5b31d23821fa65d58516728c73d4c3f95590589e ?0[steffen@essex tmp]$ AWK='nawk' mdocmx.sh -vv < /home/steffen/src/nail.git/nail.1 2>/dev/null | openssl sha1 (stdin)= c7a6231c1df5ed65ff4a5ad67e36f05b139f2ace ?0[steffen@essex tmp]$ AWK='mawk' mdocmx.sh -vv < /home/steffen/src/nail.git/nail.1 2>/dev/null | openssl sha1 (stdin)= c7a6231c1df5ed65ff4a5ad67e36f05b139f2ace ?0[steffen@essex tmp]$ AWK='gawk' mdocmx.sh -vv < /home/steffen/src/nail.git/nail.1 2>/dev/null | openssl sha1 (stdin)= c7a6231c1df5ed65ff4a5ad67e36f05b139f2ace The output is very different from the expected. I have no idea what to tell you more, i seem to recall that i had tested it at the beginning of 2015 and it was fine? But i may falsely remember that. To reproduce, you could install the s-nail package on AlpineLinux, for example. The script itself is available at [1], for example. (Repo clone at repo.or.cz.) Should be standalone. [1] https://git.sdaoden.eu/cgit/s-roff.git/plain/mdocmx.sh?h=next
Can you give me the input file which displays this behavior?
You can use the mdocmx.1 file from the same URL [1] mdocmx.sh is at, it is the smallest (3010 bytes) i have that can be processed by the script: ?0[steffen@essex roff.git]$ AWK=nawk ./mdocmx.sh <mdocmx.1 | openssl sha1 (stdin)= e949a0a362d409f79a171583ff5354a678032dcc ?0[steffen@essex roff.git]$ AWK=mawk ./mdocmx.sh <mdocmx.1 | openssl sha1 (stdin)= e949a0a362d409f79a171583ff5354a678032dcc ?0[steffen@essex roff.git]$ AWK=gawk ./mdocmx.sh <mdocmx.1 | openssl sha1 (stdin)= e949a0a362d409f79a171583ff5354a678032dcc ?0[steffen@essex roff.git]$ AWK='/bin/busybox awk' ./mdocmx.sh <mdocmx.1 | openssl sha1 (stdin)= ee1f17a703d6fa8260854e69f129eabe12db7271 ?0[steffen@essex roff.git]$ [1] https://git.sdaoden.eu/cgit/s-roff.git/plain/mdocmx.1?h=next
Thanks! Fixed in git: "delete arr[v--]" was evaluating index expression twice.