# Running an exec command

**URL:** <https://discourse.nodered.org/t/running-an-exec-command/33065>\
**Category:** General\
**Created:** [19 September 2020 00:51 UTC](https://discourse.nodered.org/t/running-an-exec-command/33065 "2020-09-19T00:51:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shel](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shel](https://discourse.nodered.org/u/shel)\
**Post date:** [19 September 2020 00:51 UTC](https://discourse.nodered.org/t/running-an-exec-command/33065/1 "2020-09-19T00:51:39Z")

</div>

I can run the following command from the command line  
lame --decode /home/pi/songs/1.mp3 - | play -  
when I try to run the command from an exec node it gives me an "error 2" message.  
Is it possible to run the command from within node red ?  
Thanks

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [19 September 2020 05:03 UTC](https://discourse.nodered.org/t/running-an-exec-command/33065/2 "2020-09-19T05:03:16Z")

</div>

> [@shel](#):
>
> when I try to run the command from an exec node it gives me an "error 2" message

Show/share your configuration of the exec node with a screenshot

---

<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:** [19 September 2020 06:24 UTC](https://discourse.nodered.org/t/running-an-exec-command/33065/3 "2020-09-19T06:24:59Z")

</div>

Also check if anything is appearing on output two.

---

<div class="post-metadata">

**Author:** ![shel](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shel](https://discourse.nodered.org/u/shel)\
**Post date:** [19 September 2020 12:32 UTC](https://discourse.nodered.org/t/running-an-exec-command/33065/4 "2020-09-19T12:32:43Z")

</div>

![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1ded5eb38042f5811fc2a3513e6173a4cda53577.jpeg)

 ![2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/9/e9641ab8c30e342ccfad2b738433f9dafa878640.jpeg)

here are two screen shots, the error message is from the second output of the node. All three outputs give me an output.

---

<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:** [19 September 2020 12:41 UTC](https://discourse.nodered.org/t/running-an-exec-command/33065/5 "2020-09-19T12:41:16Z")

</div>

You have got Append msg.payload selected. That appends whatever is in msg.payload to the command as you can see from the command it says is in error.

---

<div class="post-metadata">

**Author:** ![shel](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shel](https://discourse.nodered.org/u/shel)\
**Post date:** [19 September 2020 12:50 UTC](https://discourse.nodered.org/t/running-an-exec-command/33065/6 "2020-09-19T12:50:13Z")

</div>

(Slowly pounds head on desk)  
Looked at that a hundred times, sigh.  
Thanks for the help.

---

<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:** [19 September 2020 12:52 UTC](https://discourse.nodered.org/t/running-an-exec-command/33065/7 "2020-09-19T12:52:36Z")

</div>

> [@shel](#):
>
> Slowly pounds head on desk

We have all been there. Sometimes pounding faster helps, sometimes not.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 October 2020 12:52 UTC](https://discourse.nodered.org/t/running-an-exec-command/33065/8 "2020-10-03T12:52:44Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
