dcsimg
How to execute a shell script present in a directory of a remote location ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sathya_Sekar
Posted On:   Friday, March 22, 2002 05:29 AM


Guess it would be more apt to ask whether this is possible ? !!


We have a shell script on MachineA in a directory say A/B. I have a client Java code running on MachineB. This requires to execute the script MachineA's A/B directory.



Is this possible ? If so, how do we do it ? Any tips would be most welcome.



Thanks,


Sathya

Re: How to execute a shell script present in a directory of a remote location ?

Posted By:   srinivas_murthy  
Posted On:   Tuesday, March 26, 2002 11:05 PM

rexec hostname yourcommand.
Runtime.getRuntime().exec("rexec hostname yourcommand");

Works for me. you may have to define your commandline in an array.

String cmd[]={"rexec","hostname" blah blah};
Runtime.exec(cmd);
About | Sitemap | Contact