[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Searching Spotlight with ruby

Filipe

9/23/2007 1:23:00 AM

Is it possible to search for files using spotlight in ruby just like
it's done on the terminal with the command 'mdfind'?

3 Answers

Phrogz

9/23/2007 3:23:00 AM

0

On Sep 22, 7:22 pm, Filipe <filipedlarca...@gmail.com> wrote:
> Is it possible to search for files using spotlight in ruby just like
> it's done on the terminal with the command 'mdfind'?

You can run any terminal command in ruby (and capture the output) via
a variety of mechanisms. Does that not do what you need?

Filipe

9/23/2007 6:42:00 PM

0

On Sep 23, 12:22 am, Phrogz <phr...@mac.com> wrote:
> On Sep 22, 7:22 pm, Filipe <filipedlarca...@gmail.com> wrote:
>
> > Is it possible to search for files using spotlight in ruby just like
> > it's done on the terminal with the command 'mdfind'?
>
> You can run any terminal command in ruby (and capture the output) via
> a variety of mechanisms. Does that not do what you need?

For sure. How do I go about running terminal commands and getting
their outputs?
I'm new to this ruby thing.

Thanks in advance

Sebastian Hungerecker

9/23/2007 6:51:00 PM

0

Filipe wrote:
> For sure. How do I go about running terminal commands and getting
> their outputs?

http://groups.google.com/group/ruby-talk-google/msg/45d16a...
Easiest way is output=`command`


HTH,
Sebastian
--
NP: Darkkirchensteuer - Sehnsucht
Jabber: sepp2k@jabber.org
ICQ: 205544826