In POSIX, $0 is the name of the script and not the function. However, if you define the functions as Korn functions using the Korn syntax:
function funcname { list; }
then $0 will be set to the function name, not the script name.
But my problem is not still solved
. This is not the generic and reliable way of doing things.
Thanks & Regards,
Yeheya