From: Bill Kelly Date: 2004-05-06T07:16:07+09:00 Subject: Re: Reading frin STDIN Hi, From: "Clayton Wozney" > > c:\>type file.txt | ruby_script.rb > > I get this error message: > > The process tried to write to a nonexistent pipe. > ruby_script.rb:23:in `each_line': Bad file descriptor (Errno::EBADF) > from ruby_script.rb:23 > > Is there another way to achieve this effect? Thanx. I'm guessing the error might stem from the bug in Windows' cmd.exe, which has been talked about here in the past in what I recall being similar circumstances... Try invoking ruby explitly, like c:\>type file.txt | ruby ruby_script.rb ...if that fixes it, then I think we were seeing the cmd.exe bug. Hope this helps, Bill