Call .sh executable program of Linux from Jade

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Call .sh executable program of Linux from Jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:54 pm

by Scott Sheng\ >> Wed, 12 Oct 2005 8:09:57 GMT

Hi
Does anyone have the experiance about how to call .sh executable program of Linux from Jade?
I know I can use call _shellExecute to call external Windows executable program. But how about call Linux .sh executable program?

Many Thanks
Scott

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Call .sh executable program of Linux from Jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:54 pm

by Brendan >> Wed, 12 Oct 2005 17:03:43 GMT

Hi,
You use Node::createExternalProcess. It works on both Windows and Linux.

For example

returnVal := node.createExternalProcess("", scriptName, null, null, false, true, result);

will run a script on the Linux server with no parameters modally and the exit value of the script will be in the result variable. node will have to be referencing the Linux box you want to run the script on, either an appserver or a db server node. I would guess (but am not sure) that in JADE 6.1 you could also use this method to run a script on a Linux client by setting parameter 5 above to true.

The usual PATH rules apply so that a script not in any of the directories in the PATH shell variable will have to be referred to as ./scriptName etc.

Cheers, Brendan

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Call .sh executable program of Linux from Jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:54 pm

by Allistar Melville >> Tue, 22 Nov 2005 23:28:25 GMT

You'll possibly have to execute the interpreter directly, so instead of running "script.sh" you may need to execute "/bin/sh script.sh".

Allistar.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Call .sh executable program of Linux from Jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:54 pm

by Brendan >> Tue, 22 Nov 2005 23:40:01 GMT

No, /bin/sh isn't necessary. Just the normal PATH rules need to be followed.

Brendan


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 31 guests