I have a script that has some functions.
Can I run one of the function directly from command line?
Something like this?
myScript.sh func()
>
Briefly, no.
You can import all of the functions in the script into your environment with source (help source for details), which will then allow you to call them. This also has the effect of executing the script, so take care.
There is no way to call a function from a shell script as if it were a shared library.