[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: silly(?) request

doug meyer

3/5/2007 10:26:00 PM

I've always been a fan of the

p = %x(find ./ -name "*.c").split("\n")

--- Kyle Schmitt <kyleaschmitt@gmail.com> wrote:

> Nahh, there must be some slick way of doing this :)
>
> --Kyle
>
>


I don't mean to say that I have already achieved these things or that I have already reached perfection! But I keep working toward that day when I will finally be all that Christ Jesus saved me for and wants me to be. Philip. 3: 12, NLT
http://www.iit.edu...

- Doug Meyer





____________________________________________________________________________________
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/gre...

2 Answers

Robert Klemme

3/5/2007 10:36:00 PM

0

On 05.03.2007 23:26, doug meyer wrote:
> I've always been a fan of the
>
> p = %x(find ./ -name "*.c").split("\n")

Why not

result = Dir["**/*.c"]

:-)

Kind regards

robert

Kyle Schmitt

3/5/2007 10:44:00 PM

0

Well, partially because the find command was an example. I want to be
able to pipe the output of ANY program on my machine into a running
irb.

Yea I'm silly.

But I'll spend some time reading up on IPC and how similar things work..