# Terminal Message Output after Injecting Exec Command

**URL:** https://discourse.nodered.org/t/terminal-message-output-after-injecting-exec-command/4157
**Category:** General
**Created:** [21 October 2018 07:37 UTC](https://discourse.nodered.org/t/terminal-message-output-after-injecting-exec-command/4157 "2018-10-21T07:37:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![GChapo](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@GChapo](https://discourse.nodered.org/u/GChapo)
#### Post date: [21 October 2018 07:37 UTC](https://discourse.nodered.org/t/terminal-message-output-after-injecting-exec-command/4157/1 "2018-10-21T07:37:50Z")

</div>

Is it possible to capture the terminal message returned once an exec command has been injected in Node Red?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [21 October 2018 07:43 UTC](https://discourse.nodered.org/t/terminal-message-output-after-injecting-exec-command/4157/2 "2018-10-21T07:43:45Z")

</div>

Do you mean you are using an exec node and you want to capture the output of the command?

The exec node has three outputs. The top output is the stdout of the command. The middle output is the stderr and the third output is the return code of the command. Does that give you what you want?

---

<div class="post-metadata">

### Author: ![GChapo](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@GChapo](https://discourse.nodered.org/u/GChapo)
#### Post date: [21 October 2018 07:48 UTC](https://discourse.nodered.org/t/terminal-message-output-after-injecting-exec-command/4157/3 "2018-10-21T07:48:31Z")

</div>

I shall try them and see. Thank you

---

<div class="post-metadata">

### Author: ![GChapo](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@GChapo](https://discourse.nodered.org/u/GChapo)
#### Post date: [21 October 2018 07:54 UTC](https://discourse.nodered.org/t/terminal-message-output-after-injecting-exec-command/4157/4 "2018-10-21T07:54:45Z")

</div>

When I connect a debug node I get no message out?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [21 October 2018 08:07 UTC](https://discourse.nodered.org/t/terminal-message-output-after-injecting-exec-command/4157/5 "2018-10-21T08:07:04Z")

</div>

Have you connected a debug node to each of the three outputs?  
How have you configured the exec node?  
Have you checked you are actually triggering the exec node?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [21 October 2018 09:02 UTC](https://discourse.nodered.org/t/terminal-message-output-after-injecting-exec-command/4157/6 "2018-10-21T09:02:22Z")

</div>

> [@GChapo](#):
>
> When I connect a debug node I get no message out?

Also note that if you select Exec mode then you will get nothing till the command completes. If you want to see output whilst the command is still running then use Spawn mode.
