Content
Data
License: GNU GPLv3 +
Version number: GNU Bash 5
Developer / owner: Free Software Foundation Inc.
Short description:
The caller has a built-in Bash command manual page and help. The caller command returns the context of the current shell function or script run with the "." Or source built-in commands.
Man page output
man bash
[...]
caller [expr]
Returns the context of any active subroutine call (a shell function or a script ex-
ecuted with the . or source builtins). Without expr, caller displays the line num-
ber and source filename of the current subroutine call. 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 ex-
tra information may be used, for example, to print a stack trace. 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.
[...]
Help output
caller --help
caller: caller [kif]
Az aktuális szubrutinhívás környezetének visszaadása.
KIF nélkül "$sor $fájlnév" formátumú eredményt ad. A KIF-fel pedig
"$sor $szubrutin $fájlnév" formátumút; ez hasznos lehet stack trace
kiírásához.
Az EXPR értéke azt adja meg, hogy a jelenlegihez képest milyen mélyre
lépjen vissza; a verem tetején a 0-s keret van.
Kilépési kód:
0-val tér vissza, ha érvényes a KIF és valóban függvényt hajt végre a
parancsértelmező.
Related Content
- 24 views