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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling unix script

Status
Not open for further replies.

jbanwo

Programmer
Joined
Jan 22, 2003
Messages
1
Location
US
Is it possible to call a unix script from a collaboration script and get the return value?
 
Yes, it is. However, you need a PH on the unix box to do so without jumping through a lot of hoops.

If you are using monk, you specify #t to be allowed to process return code (see Monk Manual) and provide a monk function to do something with the value that is returned.

If you use Java then the following works
int i = Runtime.getRuntime().exec(scriptCommand).waitFor();
waitFor() is the piece that gets you an integer returncode.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top