Since both ksh and bash are based upon sh many Korn Shell scripts (ksh) will simply run as Bourne-again Shell scripts (bash) once the shebang and file extension are changed,
and you call $ bash script.bash instead of $ ksh script.ksh.
I have a basic script to replace any occurrence of ksh in a directory called "files" and changes file extensions for the scripts.
#!/bin/bash/
#replace instances
find ./files -type f - exec sed -i.bak "s/ksh/bash/g" {} \;
#Change extensions
for f in ./files/*.ksh;
do mv "$f" "./files/""$(basename "$f" .ksh).bash"
done
#Clean up
rm ./files/*.bak
This script works and does what is described above, but is it sufficient for converting any ksh script to bash, or are there conditions which I have not accounted for?