# Re: backtick commands and stderr

**URL:** <https://www.ruby-forum.com/t/re-backtick-commands-and-stderr/73786>\
**Category:** Ruby\
**Created:** [October 27, 2006, 1:27am UTC](https://www.ruby-forum.com/t/re-backtick-commands-and-stderr/73786 "2006-10-27T01:27:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 27, 2006, 1:27am UTC](https://www.ruby-forum.com/t/re-backtick-commands-and-stderr/73786/1 "2006-10-27T01:27:12Z")

</div>

From: Alexandru P. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]

> When executing a system op using the backtick method, the standard  
> output is caught and returned in the assigned variable:
> 
> output= `ls -Al`
> 
> I am wondering what happens with the standard error output?

I believe you want to look at open3 or open4

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 27, 2006, 1:31am UTC](https://www.ruby-forum.com/t/re-backtick-commands-and-stderr/73786/2 "2006-10-27T01:31:13Z")

</div>

On 10/27/06, Gavin K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> From: Alexandru P. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]
> 
> > When executing a system op using the backtick method, the standard  
> > output is caught and returned in the assigned variable:
> > 
> > output= `ls -Al`
> > 
> > I am wondering what happens with the standard error output?
> 
> I believe you want to look at open3 or open4

Can you please add some more details?

## ./alex

.w( the\_mindstorm )p.

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 27, 2006, 1:35am UTC](https://www.ruby-forum.com/t/re-backtick-commands-and-stderr/73786/3 "2006-10-27T01:35:14Z")

</div>

On 10/27/06, Alexandru P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > 
> 
> Can you please add some more details?

… found something here:  
[http://www.ruby-doc.org/stdlib/libdoc/open3/rdoc/index.html](http://www.ruby-doc.org/stdlib/libdoc/open3/rdoc/index.html), but it  
doesn’t look like working on Windows.

## ./alex

.w( the\_mindstorm )p.
