In a ksh script on an AIX box running a jillion oracle database processes, I'm setting a variable to one of two possible arguments, depending on cmd line arguments.
I want to have a way to execute the command list defined by the variable $FINDIT later in the script, putting the result in another variable. Any ideas how?
Things I have tried:
The straightforward RESULT=`$FINDIT`
(I get a usage on ps)
Putting the list in braces gives me bad substitution
FINDIT=${list}
exec is not on the system.
With either of the possible values of $FINDIT, if I execute them on the command line, there is no problem. What am I doing wrong?
Thanks! Since I'm lazy and 'eval' is shorter than creating a function, I tried that first, and it worked on the command line. I'm betting it'll work in the script as well. Of course, this is monitoring a process that runs 1/week, so I'll confirm next Tuesday...
Anyway, Thanks to both of you. It's greatly appreciated.