Currently I\'m doing some unit tests which are executed from bash. Unit tests are initialized, executed and cleaned up in a bash script. This script usualy contains an init(
From my comment on another answer (which I keep missing when I come back to this page)
$ fn_exists() { test x$(type -t $1) = xfunction; } $ fn_exists func1 && echo yes || echo no no $ func1() { echo hi from func1; } $ func1 hi from func1 $ fn_exists func1 && echo yes || echo no yes