Function Call Stack
$FUNCNAME
contains the names of shell functions on the execution call stack.
The name of the currently executed function is ${FUNCNAME[0]}
, the name of the calling function is ${FUNCNAME[1]}
and so on. The element with the highest index has value main
.
Links
BashSupport Pro 是一个 支持 $FUNCNAME 的 Bash 集成开发工具 – 马上试用!