Now that I've converted from ksh to bash, are there equivalents to ksh features like autoloaded functions and the `whence' command?

Now that I've converted from ksh to bash, are there equivalents to ksh features like autoloaded functions and the `whence' command?


There are features in ksh-88 and ksh-93 that do not have direct bash
equivalents. Most, however, can be emulated with very little trouble.

ksh-88 feature Bash equivalent
-------------- ---------------
compiled-in aliases set up aliases in .bashrc; some ksh aliases are
bash builtins (hash, history, type)
coprocesses named pipe pairs (one for read, one for write)
typeset +f declare -F
cd, print, whence function substitutes in examples/functions/kshenv
autoloaded functions examples/functions/autoload is the same as typeset -fu
read var?prompt read -p prompt var

ksh-93 feature Bash equivalent
-------------- ---------------
sleep, getconf Bash has loadable versions in examples/loadables
${.sh.version} $BASH_VERSION
print -f printf
hist alias fc=hist
$HISTEDIT $FCEDIT

Section E: How can I get bash to do certain things, and why does bash do
things the way it does?



Home FAQ