I need to create a korn function script that has parameter checking and a help section if the parameter count is wrong, then how do I create a library to store these functions and allow them to be called by others????
One way:
put your reusable function code in a separate file, let's call in MY_INCLUDE
#!/bin/ksh
# myscript.sh
# include the functions
. /path/to/MY_INCLUDE
# your main code goes here
...............
exit 0
We have several of these function include files that are used by dozens of scripts, throughout all of our major app.