On 6/25/08, Cedric Blancher <[EMAIL PROTECTED]> wrote:
> Does ksh have a way to copy shell functions? I have to write a script
>  which has to add a discipline function to variables loaded from a file
>  via . (which is the output of another application and can't be
>  changed) and the number goes into the tens of thousands.
>  I'm using eval "function ${var}.get { $function }" but this is slow
>  and uses much memory per variable ($function contains 400 bytes of
>  script code) and the system has only memory for 128MB.

Try this:

function function_common
{
$function
}

eval "function ${var}.get { function_common \"[EMAIL PROTECTED]" }"

Irek
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to