You need to put the interpreter as the first line of the script or it will be run via /bin/sh. It sounds like you really want it to run via ksh. If so, adding: #!/bin/ksh to the top of the script should fix it. - todd