If I have a Bash script like:
#!/bin/bash f() { # echo function name, \"f\" in this case }
Is there any way to do this? This could be us
You can use ${FUNCNAME[0]} in bash to get the function name.
${FUNCNAME[0]}
bash