Comment
Comment by balnaphone
It works fine with GNU env with -S support, and a GNU-compatible kernel. I'm aware that won't work on some other systems, hence the 9 other examples. I said I would try that first and see how it goes, and low and behold it works fine on the systems I use.
But if it didn't work, you can get pretty good mileage out of abusing sh to get the job done for many popular languages.