Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting return buffer from a Unix shell script

Status
Not open for further replies.

Pitone

Programmer
Oct 12, 2004
15
IT
Hi guys, how ccan I get a return value from a shell script to assign it to a variable?

Thanks!!!
 
Code:
Process p = Runtime.getRuntime().exec(yourShellScript);
int returnValue = p.waitFor();
if (returnValue  != 0) throw new IOException(yourShellScript +" exited with a non-value status : " +returnValue);



--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top