You are here: Re: Single cmd/bash session for all exec() calls - is this possible? « PHP Programming Language « IT news, forums, messages
Re: Single cmd/bash session for all exec() calls - is this possible?

Posted by c.g.dangelo on 09/12/07 18:22

On Sep 12, 1:19 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> c.g.dang...@gmail.com wrote:
> > On Sep 12, 6:50 am, melma...@gmail.com wrote:
> >> Hello
>
> >> My PHP script executes many bash/cmd commands.
> >> Functions like "exec()" or "system()" cause that new bash/cmd session
> >> is started,
> >> the command is executed and the session is closed. Unfortunately
> >> it is very slow process so I would like to increase performance and
> >> open one bash/cmd session on the begin of my script and execute
> >> the commands such as in normal system opened bash/cmd window and close
> >> it
> >> at the end of my PHP script.
> >> Does anybody know whether and (if yes) how can I do that?
>
> >> PS. I need the retrieve informations from previous command before
> >> executing next command because next command is strongly dependent on
> >> the
> >> results from previous command.
>
> >> Best regards
> >> Melmack
>
> > I would write a bash script and just execute that from within PHP. If
> > you're using so many commands that performance is becoming an issue,
> > I'd recommend that you try that. Bash scripting is terribly easy to
> > learn if you don't already know how. Even if you did find an
> > alternative in PHP, I don't think it would be as efficient as
> > executing a single script.
>
> > -c
>
> You missed one salient point in his post:
>
> "PS. I need the retrieve informations from previous command before
> executing next command because next command is strongly dependent on the
> results from previous command."
>
> Can't do it with a bash script unless you're willing to do all the work
> in the script.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

Perhaps you've misunderstood me: doing all the work in the bash script
was what I had suggested, in fact.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация