Pretty much says it all.
for example, if the command 'cp' has been previously defined as a function,
then I want to unfunction it
TjL
You mean, without getting a "no such hash table element" warning?
How about
function unfunction() {
for i; do
function $i () { }
builtin unfunction $i
done
}
[[ `type cp` == *' function' ]] && unfunction cp
This works unmodified in ksh too.
Zoli