From: Mike Stok Date: 2009-01-09T20:23:32+09:00 Subject: Re: A quick Mac OSX question On Jan 9, 2009, at 6:11 AM, Albert Schlef wrote: > Does mac osx supports the "2>&1" syntax to redirect stderr? > > In other words, does the following line of code work as expected in > mac > osx? > > output = `some_command 2>&1` > -- > Posted via http://www.ruby-forum.com/. Yes: ratdog:~ mike$ uname -a Darwin ratdog.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ratdog:~ mike$ irb >> output = `perl -e 'die "Aaargh!"'` Aaargh! at -e line 1. => "" >> output = `perl -e 'die "Aaargh!"' 2>&1` => "Aaargh! at -e line 1.\n" -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply.