Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] execute() command fails

AwTIn

2010-03-08

Replies: Find Java Web Hosting

Author LoginPost Reply

I have the following text written to a script:    

String scriptText = "csh\n" +
"cd ${jobDirPath}\n" +
"source " + binDirPath + SLASH + "rna_2d3d" + SLASH + REL_BASHRC_NAME + "\n"
+
binaryPath + SLASH + "rna_2d3d
/home/bas2/kluthta/bin/rna_2d3d/sample.dir/BPLfiles/LT17.C8s.bpl -slc\n" +
"chmod ugo+rw ${outputFileNameAbs}\n"

script.write(scriptText)

The script has both write permission and execute permissions for any and all
users.

I execute the script using the following code:

String sshCommand = "more ${passwordFileNameAbs} | ssh lola -l kluthta
${scriptNameAbs}"
def sshProc   = sshCommand.execute()

I receive no error messages. The script is supposed to generate an output
file. The file just does not appear, and if I use sshProc.waitFor(), the
Web application I am using this for just sits there.

The catch is: If I run the script manually from the terminal, it works
perfectly and the output file I need is generated. I have been doing
commands like this for some time now, and I have never had this issue.
--
Sent from the groovy - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.