The default shell does not affect how scripts are executed (unless you're using a shell that does something very strange).
An executable script with no #!
line will be executed with /bin/sh
. Actually that doesn't appear to be correct, but in any case you don't have to worry about that.
As long as your scripts start with #!/bin/ksh
and you execute them normally, the system will execute them by passing them to /bin/ksh
.
One thing you might have to worry about is whether /bin/ksh
exists, and if it does, just what it is. On my system (Linux Mint 17), /bin/ksh
is a symlink to /etc/alternatives/ksh
, which in turn is a symlink to /bin/ksh93
.
Scripts with #!/bin/ksh
are probably common enough that almost all UNIX-like systems will cater to them, and will install something that behaves like ksh at that location.
Note that what you call the "default shell", specified by $SHELL
, is not a system-wide default. It's just the value of a particular environment variable. That variable is set for each user on login based on the shell specified in /etc/passwd
or equivalent; thus different users can have different default shells. You can change the value of $SHELL
after logging in. The entry in /etc/passwd
or equivalent is set when the account is created, and can be changed later. Most systems have a default user shell that's set for new accounts if no shell is specified (for example, most Linux systems user /bin/bash
).