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 workMills Thomas (app1tam) wrote:
If I do this:
> type cat.rbI get this output:
print $stdin.readlinesIf I do this:
> type cat.rb | ruby -e “print $stdin.readlines”I get this output (NOTE, it’s the same):
print $stdin.readlinesIf I type this command (.rb has been associated to ruby.exe on
Win2K):
> type cat.rb | cat.rbI 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