Cannot use the exec command in shell scripts
The Java™ JSch library uses "exec" channel to run
bash scripts. Due to this limitation, custom alert and job shell scripts cannot include invocation
of another shell type. Therefore, an exec command in a shell script exec ksh
'<>'
cannot be used to create a Korn shell and passed directly to the text box in the
shell job.
Symptoms
The shell scripts hang and do not run.
Resolving the problem
To resolve this issue, do one of the following:
- Move the script to a ksh script as
tmp.ksh
and run it as./path/to/tmp.ksh
from the text box on IBM® Db2® Intelligence Center. - Change the default shell on the system by using
chsh
or similar methods. Enter this script to the text box and then run it.