Here’s a little recipe for printing a “call-stack” for Bash scripts. A call-stack is normally the list of nested function calls. This recipe will utilize the
BASH_SOURCE
, BASH_LINENO
, and FUNCNAME
environment variables, set by Bash during script executions, to display a call-stack of one script to another, excluding function calls; this will show only the invocations of one script to another. Read the rest of this entry »