return value

Michael Hipp Michael at hipp.com
Tue Nov 18 18:12:26 PST 2008


stdout, pipes, shared memory location, sockets, IP connection, or a temp file. 
Also java has facilities for communicating among threads - that's supposedly 
one of it's selling points. (But I'm not a Java programmer.)

I forget where I saw it said, but rule #1 of using the return code from a 
program run from the shell is that it is *not* to be used like returning some 
value from a function. Wrong tool for the job.

The other thing us expert (ahem!) programmers ask ourselves is something like: 
"If what I'm attempting to do is this difficult / contorted, then is it 
possible my approach / design / architecture needs a re-think?"

Michael


idan72 wrote:
> 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 ?




More information about the Linux-users mailing list