> a bigger lesson here: using /bin/sh as the shebang means you have to test on at least POSIX sh and GNU bash in POSIX-compliant mode.

I'd argue that's the smaller lesson. The point I was trying to make was that using `/bin/sh` means you would have to test it in *every* shell in *their particular* POSIX-compliant mode. For example, dash (which sh is linked to on debian) gets things wrong with `echo` and escapes in strings.