On 3/2/07, Jenda Krynicky <jenda / cpan.org> wrote:
> reed.adam / gmail.com wrote:
> > Thanks for the explanation Tim, that's exactly what I needed.  I
> > didn't realize they would act differently under windows/unix - I think
> > I was stuck on imagining them as code-specific items because I wasn't
> > used to hearing about them in unix.
> >
> > Strangely enough, I'm ok as far as unix and pipe/redirection, and I've
> > been logging output of standard unix stuff to files for a couple of
> > years - just never knew specifically what the output was called.  Go
> > figure.
>
> The thing to watch out for under Windows is that (at least on some
> versions)
>
>    script.rb > results.txt
>
> doesn't work and you have to write
>
>    ruby script.rb > results.txt
>
> This is caused by the fact that the cmd.exe has to use a different WIN32
> API call to execute the script using the file extension mapping than
> what it would use for .exe and thatthe former doesn't preserve the
> STDxxx redirection.

Also, although I haven't really kept up with windows, it used to be
able to redirect stdout, but not stderr.

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/