Hi,
Is it possible to return a value from a program called by a bash batch ?
Example:
The second line of this batch launches an interactive program where the user gives some informations.
#!/bin/bash
open -W -b com.company.MyProg
echo $?
Depending on the informations, I need to execute some other actions. For instance, in MyProg I do:
If not vl_ok then begin
System.ExitCode:= ExitNotRegistered; // return 1
end
else begin
System.ExitCode:= ExitOk; // returns 0
end;
Application.Terminate;
In the batch, $? always has a value of 0. That's normal because the command 'open' has been successfull. Is there any way to get the value set in MyProg ?
André