Changing from bash to ksh

Hello,

I want to run a script written in ksh but my default shell is bash as root e.g in the script it has #!/bin/ksh
i have gone into /etc/passwd to change it from :/bin/bash to /bin/ksh
but still giving me an error when running scripts such as

  ./installer
-bash: ./installer: /bin/ksh: bad interpreter: No such file or directory

try searching for a interpreter

which ksh

If you don't have ksh, the natural thing to do would be to install it using whatever package manager is traditional for your OS and distribution.

Or an interesting exercise would be to convert your script to run on bourne shell, so that it works on all shells. Would be quite insightful to do so :slight_smile: