mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
22 lines
496 B
Plaintext
22 lines
496 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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`
|
|
|
|
- Print the line, function, and filename where the current function was called:
|
|
|
|
`caller 0`
|
|
|
|
- Print the line, the function name, and the filename of a function call `n` frames back:
|
|
|
|
`caller {{n}}`
|