I have a function. I need to use it in parallel calls. for that I need to export the function first in ksh, which O am not able to. export -f or export -q, nothing is working really.
Asked
Active
Viewed 1,707 times
3 Answers
0
I know this is kinda late, but I had the same issue. So what I did was, I put my functions into a variable, and then exported the variable. In the contexts where I want the function inside of the variable, I eval
the variable.
Also, you can define the function in a here document and put them into an variable as seen in this question How to assign a heredoc value to a variable in Bash?.
Stupid right? Well, it works. What a kludge. :/

Adrian
- 10,246
- 4
- 44
- 110
-1
If you are using ksh
, then simply write export function_name
without any options. I tried it, and it worked for me.
For example
function foo {
#some linux scripting
}
export foo
That's it...

firoj_mujawar
- 301
- 4
- 14