Bash - Caller - Stack Trace (Builtin command)

Bash Liste Des Attaques Ovh


Caller is a builtin command that returns the context (localization) of any active subroutine call (a shell function or a script executed with the . or source builtins.


caller [expr] 
  • The current frame is frame 0.
  • The return value is 0 unless the shell is not executing a sub- routine call or expr does not correspond to a valid position in the call stack.

Without expr

Without expr, caller displays the line number and source filename of the current subroutine call.

With expr

If a non-negative integer is supplied as expr, caller displays:

  • the line number,
  • subroutine name,
  • and source file corresponding to that position in the current execution call stack.

This extra information may be used, for example, to print a stack trace.

Discover More
Bash Liste Des Attaques Ovh
Bash - Builtin Commands

builtin refers to: a builtin command. See or to the specific builtin command. See (useful when defining a function whose name is the same as a shell builtin) The builtin command execute the specified...

Share this page:
Follow us:
Task Runner