Hi,

I am developing a CLI client using bean shell script. I require some help on the bean shell script.  I am facing an issue in getting exit value in the calling script. I am performing Sysgem.exit(1001) from my code. But I am getting exit value as 233. I am expecting to get 1001 instead of 233. I appreciate your help on this.

Following are my script snippet.

while (true)
do
$JAVA_HOME/bin/java -cp $CLASS_PATH  bsh.Interpreter $1

CLI_EXIT_VALUE=$?
echo "exit value-->"$CLI_EXIT_VALUE
if [ $CLI_EXIT_VALUE -ne 1001 ]
then
        exit $CLI_EXIT_VALUE
fi
done



Thanks,
Ramesh