how to run a shell script from within a ss script?
When a certain condition is met, I want to run a shell script that I have put in the Screen Scraper main installation directory. So my ss script code would look something like this, inside a while loop:
if (counter == 15)
{
session.logError("15 iterations reached. Running the shell script and then waiting for 2 minutes");
[run myshellscript.sh]
counter = 0;
sutil.pause(120000);
}
else
{
session.logError("Everything fine. Waiting for 10 seconds"
counter = counter + 1;
sutil.pause(10000);
}
{
session.logError("15 iterations reached. Running the shell script and then waiting for 2 minutes");
[run myshellscript.sh]
counter = 0;
sutil.pause(120000);
}
else
{
session.logError("Everything fine. Waiting for 10 seconds"
counter = counter + 1;
sutil.pause(10000);
}
How can it be done?
Thank you very much,
Boga
Your missing line would be
Your missing line would be something like
Thank you! For reference It
Thank you!
For reference It ended up being:
Runtime.getRuntime().exec("sh myshellscript.sh");
cheers,
Boga