Does the POSIX shell have something similar to $FUNCNAME in bash ?
No. The list of variables which are required to have special behavior by the POSIX sh standard is quite small, and no equivalent to FUNCNAME is given; the closest thing is LINENO.
(If such a thing already existed in POSIX sh, why would bash have added its own rather than implementing the specification?)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With