Hi,
Can anyone tell me why I get the different exit status for the following script execution:
Script A
----------
ksh -c "/proj/prog.exe " 2>>/tmp/run.log 1>/tmp/error.log << !
^M
!
ret_code=$?
Script B
--------
ksh -c "/proj/prog.exe " << !
^M
!
ret_code=$?
Why am I getting different exit status (ret_code) from script A and script B?
The correct return code should be from the program - prog.exe which is 100, but I am getting exit status as 1 in script A ? Why?
I am suppose to use method script A but how to get the correct return code in this case?
Can anyone tell me why I get the different exit status for the following script execution:
Script A
----------
ksh -c "/proj/prog.exe " 2>>/tmp/run.log 1>/tmp/error.log << !
^M
!
ret_code=$?
Script B
--------
ksh -c "/proj/prog.exe " << !
^M
!
ret_code=$?
Why am I getting different exit status (ret_code) from script A and script B?
The correct return code should be from the program - prog.exe which is 100, but I am getting exit status as 1 in script A ? Why?
I am suppose to use method script A but how to get the correct return code in this case?