does not behave in the same way on Windows and UNIX, so it might be better to use
instead, which is similar on both (although there are still a few differences).
Although the latest ksh93 versions exec on the last statement within a script, I don't think that bash does.
One other thing to be aware of, environment variables on UNIX are case sensitive but on Windows are not - that can catch you out.