Calling Bash functions is as simple as invoking a Bash command. To call an already-declared Bash function, use the function name as if it were a Bash command. For instance, to invoke a function declared as fname() { command; }, type fname in the terminal or within the script where the function is defined. This article talks about 7 different cases of calling functions in the Bash shell.
1. Calling a Function Defined in the Terminal
Think about a function defined in the terminal as follows:
func1 () {
echo "Hello from a Bash function"
}