[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: browser -> command line

Trans

6/19/2007 3:42:00 AM



On Jun 18, 8:12 pm, "Matt M." <goodie...@gmail.com> wrote:
> Hi,
>
> I was hoping I could get this done with PHP 5 in a day, but it's turning out
> to be a little more complicated than I thought. Maybe Ruby can do this sort
> of thing easier? What I'd like to do is have a browser/web interface talk to
> a command line script, that in turn does an svn update on a particular
> directory. I'd also like to be able to get "real-time" output from the
> script. I realize that getting real-time feedback in the browser will
> require ajax. Updating from SVN is only one of the command line tasks I have
> to do.
>
> Any ideas on how I can do this?

http://tryruby....

T.


1 Answer

SonOfLilit

6/19/2007 2:24:00 PM

0

`cat #{__FILE__}` is a simple example of invoking the command line from Ruby.

This has been discussed a LOT.

There are libraries that make sysadmining easy with ruby.


Aur

On 6/19/07, Matt M. <goodieboy@gmail.com> wrote:
> Hey thanks. I should have worded this much differently. At this point I'm
> forgetting about the browser. I know ruby, but don't have a lot of command
> line/IO experience with it. So my question should have been more related to
> the IO class. To be more specific, how can do you mange commands, command
> status results (successful, failed?) . The basic flow would be, su to some
> other user, if password OK, proceed to next command, display error, etc..
>
> Feel like showing me a skeleton script that could do something like that? :)
>
> I've been messing with IO.popen, Kernel.system tonight and getting some
> results.
>
> Thanks again.
>
> On 6/18/07, Matt M. <goodieboy@gmail.com> wrote:
> >
> > http://www.ruby-forum.com/to...
> >
> > On 6/18/07, Trans <transfire@gmail.com > wrote:
> > >
> > >
> > >
> > > On Jun 18, 8:12 pm, "Matt M." < goodie...@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > I was hoping I could get this done with PHP 5 in a day, but it's
> > > turning out
> > > > to be a little more complicated than I thought. Maybe Ruby can do this
> > > sort
> > > > of thing easier? What I'd like to do is have a browser/web interface
> > > talk to
> > > > a command line script, that in turn does an svn update on a particular
> > > > directory. I'd also like to be able to get "real-time" output from the
> > >
> > > > script. I realize that getting real-time feedback in the browser will
> > > > require ajax. Updating from SVN is only one of the command line tasks
> > > I have
> > > > to do.
> > > >
> > > > Any ideas on how I can do this?
> > >
> > > http://tryruby....
> > >
> > > T.
> > >
> > >
> > >
> >
>