From: William Pinelo Marin Date: 2003-10-15T23:27:49+09:00 Subject: Re: Piping to windows command line .rb file doesn't work try this link: http://sourceforge.net/project/showfiles.php?group_id=23617&release_id=47300 --.Pinelo. ----- Original Message ----- From: "Mills Thomas (app1tam)" To: "ruby-talk ML" Sent: Tuesday, October 14, 2003 2:44 PM Subject: Re: Piping to windows command line .rb file doesn't work > That works fine. But it isn't what I wanted. I'm trying to get some of the > common Unix commands available under Windows. And I want them to work like > they do on the Unix command line. > > And, before anyone suggests it, I can't download any tools from the net or > buy any packages. My corporation is paranoid to an extreme. I can write > all the code I want but can't install someone elses without 'permission'. > > So I'm writing enough ruby to get by as I need a tool (I just started). > > Drew > > > -----Original Message----- > > From: Michael Campbell [mailto:michael_s_campbell@yahoo.com] > > Sent: Tuesday, October 14, 2003 2:17 PM > > To: ruby-talk@ruby-lang.org > > Subject: Re: Piping to windows command line .rb file doesn't work > > > > > > Mills Thomas (app1tam) wrote: > > > > > If I do this: > > > home> type cat.rb > > > > > > I get this output: > > > print $stdin.readlines > > > > > > If I do this: > > > home> type cat.rb | ruby -e "print $stdin.readlines" > > > > > I get this output (NOTE, it's the same): > > > print $stdin.readlines > > > > > > If I type this command (.rb has been associated to ruby.exe on > > Win2K): > > > home> type cat.rb | cat.rb > > > > > > I get this output: > > > cat.rb:1:in `readlines': Bad file descriptor (Errno::EBADF) > > > > > > from cat.rb:1 > > > > > > > > > What about type cat.rb | ruby cat.rb ? > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > >