date
test_fn()
{
echo "function within test shell script "
}
on the shell prompt I run
> . test
Then I invoke the function on the command line as below :
test_fn()
It echos the line
function within test shell script
and works as expected.
Question (1) how do I find out what are all the shell functions known to the current shell ? I tried set but that does not show my function . I tried which test_fn but that too says it does not know about test_fn
(2) how to I make the current shell get rid of the function. I tried unset test_fn - but that does not do it and returns an exit status of 1.
moxxx68 - Thanks for your reply, but, that didn't help much.
I want to know what are the exact command and switches in order to display the names of all the functions currently known to the shell.
And how to remove the definition of the function from the shell.