This code is in my 'case' statement and it all else works fine.
The problem I have is that the value in 'procno' is not passed on to the external program (fireit).
It is passing all zeros instead of the actual process number.
By the time I get to this case statement, I know the "Number" and "Proc".
I then set procno variable to 'Number' and procname to 'Proc' in this 'case' block:
.
.
*\)
procno=$Number
procname=$Proc
if [[ $procname = myspecialproc ]]; then
echo "Skipping this process."
else
echo "Kicking off process $procname ProcessID \#$procno..."
\# pass the procno to external program fireit:
fireit $\{procno\}
rc=$?
if [[ $rc -eq 0 ]]; then
echo "Process $procname was kicked off, ProcessID is $procno."
else
echo "Process didn't kick off."
fi
fi
etc...
The 'rc' always returns '0' because it is successful kicking off 'fireit'.
However, the log from 'fireit' shows that this script passed in all zeros ('00000')
instead of say, '12345'.
The log looks like this in this script (myscript.ksh):
..
Kicking off process SumResult100 ProcessID # 12345...
Process SumResult100 was kicked off, ProcessID is 12345.
...
fireit log shows:
Sorry. ProcID '00000' was not found.
What's going on???
This is on AIX and using KSH. It seems that myscript is capturing and sending correct number to fireit but fireit sees all zeros and message is displayed exactly as seen on the screen.
Also, I cannot modify fireit, it's an internal program from a third party software, the error log that is captured is seen only on the screen.
If I type "fireit 12345" on the Unix command line, it works but not via this script.
Thanks,
Giannicello