How to run this command in groovy :
/home/srinath/junk/sync.sh > /home/srinath/junk/copy.log
This is working when tried on terminal . but fails when used execute in groovy
Could any one please help me on this .
thanks in advance
sri..
How to run this command in groovy :
/home/srinath/junk/sync.sh > /home/srinath/junk/copy.log
This is working when tried on terminal . but fails when used execute in groovy
Could any one please help me on this .
thanks in advance
sri..
Shell based redirection and piping doesn't work from inside the JVM without a bit of data handling
For this example, you should be able to do:
new File( '/home/srinath/junk/copy.log' ).write( '/home/srinath/junk/sync.sh'.execute().text )