> In beanshell how to hold the results returned by a command?
> I am trying :
> res=exec("/bin/echo bla");
> expecting bla to be the content of res but thats not happening.
> 
> Searched myexperiment, beanshell homepage but could not find any clues.

Beanshell document says the output is printed, it suggests there is no
simple way to collect the output.

http://www.beanshell.org/manual/bshcommands.html#exec

In Soaplab, ProcessBuilder class is used to execute command line
programs.

http://java.sun.com/javase/6/docs/api/java/lang/ProcessBuilder.html

Since BeanShell understands standard Java statements, expressions, and
method declarations you can use ProcessBuilder class for executing your
command and for gathering its outputs.

In my limited previous experience with Beanshell i used to first
implement my code in Eclipse and after making sure it works in the way i
expect i was copying relevant bits of the code to Taverna.

Regards,
Mahmut



------------------------------------------------------------------------------
_______________________________________________
taverna-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/taverna-users
Documentation: http://www.mygrid.org.uk/usermanual1.7/
FAQ: http://www.mygrid.org.uk/wiki/Mygrid/TavernaFaq
Biological Services: http://www.mygrid.org.uk/wiki/Mygrid/BiologicalWebServices

Reply via email to