Let's take a little example:
$ cat fu.sh
#!/usr/local/bin/bash
function lsl () {
ls -1
}
function grps () {
lsl | grep fu.sh
}
echo "This file is: `grps`"
Let's run it to see it works as we want:
$ ./fu.sh
This file is: fu.sh
So - we have function lsl which called from second function grps. Also - we called function grps alone at the end of script.
Here is a question - is there anything "unusual", "unsafe" or may be "irritant" and "not Feng Shui" - call function without any option or argument passed to it?
bash-specific, but no - there is nothing wrong with such a function, as long as the function does exactly what you intended for it to do.functionkeyword and brackets (cf. here).function grps () { echo "$(basename "$0")" ; }instead