return value

idan72 ishai at cisco.com
Tue Nov 18 13:16:53 PST 2008


Hi,

I am running from the shell several java program and I need to send for
program 2 the value return from program 1. The value isn't error code but a
value compute in first program and used in second.

Is there other way to do that beside using file ?

Thanks

David A. Bandel-2 wrote:
> 
> On Tue, Nov 18, 2008 at 6:16 AM, idan72 <ishai at cisco.com> wrote:
>>
>> Hi,
>>
>> I am running java program from batch file on linux.
>> I want to get the return value using $? .
>> If the value is less than 256 there is no problem.If it greater it return
>> only the byte (257-> 1, ...) .
>>
>> How can I overcome this issue that the return value is only a byte ?
> 
> rewrite bash? write your own shell?
> 
> normal exit status is 0 (success), 1 (failure), 126 (file found but
> not executable), 127 (file not found).  Other exit status' are thrown
> to help programmers trap errors (exit 2, etc).  And 127+n is available
> (but only up to 255).  Just how many errors are you trying to trap
> anyway?  Sounds like you're trying to use exit status for something it
> wasn't designed for.
> 
> Ciao,
> 
> David A. Bandel
> -- 
> Focus on the dream, not the competition.
>             - Nemesis Air Racing Team motto
> _______________________________________________
> Linux-users mailing list ( Linux-users at linux-sxs.org )
> Unsub/Password/Etc: 
> http://linux-sxs.org/mailman/listinfo/linux-users
> 
> Need to chat further on this subject? Check out #linux-users on
> irc.linux-sxs.org !
> 
> 

-- 
View this message in context: http://www.nabble.com/return-value-tp20557620p20568382.html
Sent from the Linux Users (linux-sxs.org) mailing list archive at Nabble.com.




More information about the Linux-users mailing list