[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Piping to windows command line .rb file doesn't work

Mills Thomas (app1tam)

10/14/2003 7:44:00 PM

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...

1 Answer

William Pinelo Marin

10/15/2003 2:28:00 PM

0

try this link:
http://sourceforge.net/project/showfiles.php?group_id=23617&releas...

--.Pinelo.

----- Original Message -----
From: "Mills Thomas (app1tam)" <app1tam@ups.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
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...
>
>