Shell based tasks like yours always create a terminal associated with it. You can use the
TaskService to start a new task, which returns some info about the running task (as a
TaskInfo object) which in turn contains the terminal id. With that terminal id you can use the
TerminalService and ask for the actual terminal that runs your task (using
Using that terminal, you can hook into the
onData event which fires every time the terminal receives new text/data. Afterwards, you can do with whatever you want with that string. There no way that I’m aware of to just retrieve the whole task output (or terminal output for that matter).