# Logstash output exec - stdout redirect impossible?

**URL:** <https://discuss.elastic.co/t/logstash-output-exec-stdout-redirect-impossible/64709>\
**Category:** Logstash\
**Created:** [November 2, 2016, 12:13pm UTC](https://discuss.elastic.co/t/logstash-output-exec-stdout-redirect-impossible/64709 "2016-11-02T12:13:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulkeogh](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@paulkeogh](https://discuss.elastic.co/u/paulkeogh)\
**Post date:** [November 2, 2016, 12:13pm UTC](https://discuss.elastic.co/t/logstash-output-exec-stdout-redirect-impossible/64709/1 "2016-11-02T12:13:32Z")

</div>

Hi,

Based on my understanding of the code, it looks impossible to execute a command that redirects stdout to a file for example - so;

command \> /tmp/myoutput won't work.

This is because of the line;

Open3.popen3(cmd) do |stdin, stdout, stderr|

Which I understand tells Ruby to capture the stdout of the executed command.

Is there any workaround available ?

---

<div class="post-metadata">

**Author:** ![jsvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsvd/32/6203_2.png) [@jsvd](https://discuss.elastic.co/u/jsvd)\
**Post date:** [November 2, 2016, 12:57pm UTC](https://discuss.elastic.co/t/logstash-output-exec-stdout-redirect-impossible/64709/2 "2016-11-02T12:57:36Z")

</div>

confirmed. I created an issue for this: [https://github.com/logstash-plugins/logstash-output-exec/issues/11](https://github.com/logstash-plugins/logstash-output-exec/issues/11)

---

<div class="post-metadata">

**Author:** ![zyguy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zyguy/32/13421_2.png) [@zyguy](https://discuss.elastic.co/u/zyguy)\
**Post date:** [November 25, 2016, 3:36pm UTC](https://discuss.elastic.co/t/logstash-output-exec-stdout-redirect-impossible/64709/3 "2016-11-25T15:36:22Z")

</div>

👍  
Hi ! Any update for this issue ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:30am UTC](https://discuss.elastic.co/t/logstash-output-exec-stdout-redirect-impossible/64709/4 "2017-07-06T04:30:13Z")

</div>

Closed on July 6, 2017, 4:30am UTC


