Doesn't this require the ksh shell to be installed? Might be better to use the generally available sh.