Quote:
Originally Posted by
SkySmart
i really need to be able to source functions however they are stored in a variable.
i understand it shouldnt be done this way. but i have my own need to do it this way.
doesnt look like its possible
We all know that different shells behave differently. (And we know that you haven't told us what shell or shells you're using for this problem.)
We all know that we can do some things in shell code a few different ways (or a few thousand different ways) depending on what we are trying to do. (And we know that you haven't told us what you are trying to do other than define functions that have been read from a file into a variable.)
The only thing I see here that is impossible is for us to accurately guess at
why you think you have to use this method to define functions and
what you are going to do with those functions after you define them.
If you would share with us what you are trying to do instead of telling us how you want to implement a small piece of what you want to do, we might be able to help you find a solution to your problem.
P.S. Did you know that some shells can export functions in addition to exporting variables?