Realtime output to console from string execute


(Scott Duchin) #1

I want to run a string command “appcfg.sh…” and see the output on the console as it is running. Now I do cmd.execute().waitFor() but the console shows no progress. What is the best way to do this?


(Gary Hale) #2
project.exec { commandLine = [ 'echo', 'hello!' ] }

If your command is a string and you can’t control that, you’ll need to split it into a List.


(Benjamin Muschko) #3

Alternatively, you can use the task type Exec.


(Scott Duchin) #4

thank you both i did a combo of this actually i put the commandLine = [ x, y, z ] into an Exec task