I have a small ruby script n.rb that captures STDIN into a temp file (then does stuff with it). Basically, the only line that matters is along the lines of
and it's executed either by
cat foo.txt | n.rb
n.rb < foo.txt
This little script works fine in Vista with cmd.exe or console2.
In Win7-64, script works fine in cmd.exe, but generates this error in console 2.0b144:
C:\Program Files (x86)\Console2>dir |n.rb
C:/bin/n.rb:15:in `readlines': Bad file descriptor (Errno::EBADF)
C:\Program Files (x86)\Console2>
does console somehow mess with pipe behavior?
I found an error something similar to this. But this is in windows xp. When in a command if i use more than one redirects or >> or if there is a pipe and a redirect, console screen stops updating the output or keyboard inputs. But everything seems fine in the command window.