2025-03-14 21:59:59 -06:00
|
|
|
# caller
|
|
|
|
|
|
|
|
|
|
> Print function context.
|
|
|
|
|
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-caller>.
|
|
|
|
|
|
|
|
|
|
- Print the line and filename where the current function was called:
|
|
|
|
|
|
|
|
|
|
`caller`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Print the line, function, and filename where the current function was called:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`caller 0`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Print the line, the function name, and the filename of a function call `n` frames back:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`caller {{n}}`
|