Bus Error

I am getting bus error when i include "#!/bin/ksh". If i remove interpreter then script is working. Can anyone explain this and how can i avoid this error?

Operating System is HP-UX B.11.23 U 9000/800 1091834454

SOMETIMES -- if the permissions on /bin/ksh do not allow you to execute the file you will see this error. I have not seen it in 11.23

Try ls -l /bin/ksh to see.

We assume that the file was created and edited solely using a unix standard editor such as "vi" with the keyboard correct. You could also get this effect by editing the script on a Windows PC.

To see of there are funny characters in your script file.

sed -n l scpt

Also check that these are identical (should be a hard link).

ls -lisad /bin/ksh
ls -lisad /usr/bin/ksh