Hi,
I would go to the javascript wrapper solution :
I would wrap cgi-script to send javascript code to browser and then
redirect original script output to the html file
In a javascript I would loop (and sleep) until load of html file will
succeed.
On 12/27/2010 08:26 PM, Dov Grobgeld wrot
Thanks for the help! Based on it I tried running the command with python as
follows:
import subprocess
pipe = subprocess.Popen("do_slow_command 2>&1",
bufsize=1,
stdout=subprocess.PIPE,
stdin=subprocess.PIPE,
shell=True)
for p in pipe.stdout.readlines():
p
2010/12/27 shimi
>
>
> 2010/12/27 Dov Grobgeld
>
>> I'm trying to write a cgi wrapper for a long running command. The command
>> takes about 10minutes to execute and when running it from the command line
>> it continously outputs text to stdout. A simplistic cgi-bin wrapper that
>> tries to exec
2010/12/27 Dov Grobgeld
> I'm trying to write a cgi wrapper for a long running command. The command
> takes about 10minutes to execute and when running it from the command line
> it continously outputs text to stdout. A simplistic cgi-bin wrapper that
> tries to execute the script and then writes
If you can send once in a while data to the output of the cgi, but not to
finish the execution so it's pipe to the HTTP server will not terminate and
the request will not end, then it should work, because there is a response,
it's just keep on going, however if you do not send a thing, then the
tim
I'm trying to write a cgi wrapper for a long running command. The command
takes about 10minutes to execute and when running it from the command line
it continously outputs text to stdout. A simplistic cgi-bin wrapper that
tries to execute the script and then writes that it is done fails with the
fo
On Mon, Jun 14, 2010 at 11:02:11PM +1000, Amos Shapira wrote:
> On 14 June 2010 22:48, Aharon Schkolnik wrote:
> > On Monday, June 14, 2010, Noam Meltzer wrote:
> >> use $@ instead of $*
> >
> > Does that work for you ?
> >
> > I still get the same results - the script treates file\ one as two
> >
On Monday 14 Jun 2010 15:27:43 Aharon Schkolnik wrote:
> Hi.
>
> I want to write a script which will nice ffmpeg whatever parameters it is
> given - ie:
>
> #!/bin/sh
>
> nice ffmpeg $*
>
> #
>
>
> However, what if I have a file named `file one'
>
>
> I would like to type `myscript -i file\
Quoting Noam Meltzer :
use $@ instead of $*
But put it in quotes: "$@". Otherwise the effect is lost.
Herouth
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
On Monday, June 14, 2010, Noam Meltzer wrote:
> I'm sorry. I tend to forget why I hate shell scripts.
> Use "$@" instead. (checked it this time, it works ;-) )
Yep - looks like nice ffmpeg "$@" does the trick.
Thanks !
>
> 2010/6/14 Aharon Schkolnik
>
> > On Monday, June 14, 2010, Noam Melt
I'm sorry. I tend to forget why I hate shell scripts.
Use "$@" instead. (checked it this time, it works ;-) )
2010/6/14 Aharon Schkolnik
> On Monday, June 14, 2010, Noam Meltzer wrote:
> > use $@ instead of $*
>
> Does that work for you ?
>
> I still get the same results - the script treates fil
On 14 June 2010 22:48, Aharon Schkolnik wrote:
> On Monday, June 14, 2010, Noam Meltzer wrote:
>> use $@ instead of $*
>
> Does that work for you ?
>
> I still get the same results - the script treates file\ one as two
> parameters - file and one.
1. Try switching to #!/bin/bash - I think the "$@
On Monday, June 14, 2010, Noam Meltzer wrote:
> use $@ instead of $*
Does that work for you ?
I still get the same results - the script treates file\ one as two
parameters - file and one.
>
> On Mon, Jun 14, 2010 at 3:27 PM, Aharon Schkolnik
wrote:
> > Hi.
> >
> > I want to write a script
use $@ instead of $*
On Mon, Jun 14, 2010 at 3:27 PM, Aharon Schkolnik wrote:
> Hi.
>
> I want to write a script which will nice ffmpeg whatever parameters it is
> given - ie:
>
> #!/bin/sh
>
> nice ffmpeg $*
>
> #
>
>
> However, what if I have a file named `file one'
>
>
> I would like to type
Hi.
I want to write a script which will nice ffmpeg whatever parameters it is
given - ie:
#!/bin/sh
nice ffmpeg $*
#
However, what if I have a file named `file one'
I would like to type `myscript -i file\ one output.whatever`
I do not want to change what I type - the script needs to be a
awesome, thanks for the info.
2009/12/8 Amos Shapira
> 2009/12/8 Tom Goren
>
> does it work with *su* (as opposed to over ssh)?
>>
>> i.e. *su - bybass -c "/Path/To/bypass.sh** param1 param2"
>>
>> *also, more information is definitely required, especially why you are
>> trying to use this
2009/12/8 Tom Goren
> does it work with *su* (as opposed to over ssh)?
>
> i.e. *su - bybass -c "/Path/To/bypass.sh** param1 param2"
>
> *also, more information is definitely required, especially why you are
> trying to use this script as the default user shell, which does not sound
> like be
does it work with *su* (as opposed to over ssh)?
i.e. *su - bybass -c "/Path/To/bypass.sh** param1 param2"
*also, more information is definitely required, especially why you are
trying to use this script as the default user shell, which does not sound
like best practices...
a shell is a shel
Try running the command its parameters inside quotes (")
for example: ssh u...@host "command param1 paramN"
I must say that it is quite difficult to provide you with a solution because
I don't really know what the script does and how does it handles each
parameter, it would be better if you can p
I have a user called bypass whose defined shell in /etc/passwd is
/Path/To/bypass.sh
that script takes three parameters. When I run the script from the command line
the script identifies the parameters. However, when the script is run via an
ssh command (i.e. ssh byp...@10.1.1.1 Parm1 Parm2 Par
Dan Kenigsberg wrote:
I happenned to stumble on this question recently.
prctl(2) has PR_SET_NAME. An even simpler solution, that may work on non-Linux
too and may be good enough, is softlink.
From the prctl man page:
CONFORMING TO
This call is Linux-specific. IRIX has a prctl() s
an's email I tried running the set with strace, and realized it
> was, indeed, a user space thing. As I need that for a (user space)
> program that intercepts the actual kernel calls (and sometimes emulates
> them), I will assume that the governing rule is that a program can have
>
On Thu, Mar 20, 2008 at 07:25:19PM +0200, Shachar Shemesh wrote:
> And now to a slightly related subject - does anyone know how I can
> change the command line that appears in "ps" for a program after it has
> been run? I know it should be possible, because I vaguely remember
> programs that rec
ernel calls (and sometimes emulates
them), I will assume that the governing rule is that a program can have
just one shell script in its interpreter path.
And now to a slightly related subject - does anyone know how I can
change the command line that appears in "ps" for a program afte
rong place. I got as far as the
> function "load_script"
> (fs/binfmt_script.c line 18 in the 2.6.23 kernel
> code), which seems to
> go over the file, extract the interpreter, and
> restart the entire
> process. Of course, once the process has restarted,
> bprm->s
On Thu, 20 Mar 2008, Shachar Shemesh wrote:
Hi all,
I tried the following experiment. /tmp/file1 (marked executable) has the
following content:
#!/bin/date
echo "$@"
/tmp/file2 has the following content:
#!/tmp/file1
echo "File2"
when I run file2, I expect it to print out the current
Did you add /tmp/file1 to the list in /etc/shells?
On Thu, 2008-03-20 at 16:23 +0200, Shachar Shemesh wrote:
> Hi all,
>
>
> I tried the following experiment. /tmp/file1 (marked executable) has the
> following content:
>
> #!/bin/date
>
>
> echo "$@"
>
>
> /tmp/file2 has the following conte
r the file, extract the interpreter, and restart the entire
process. Of course, once the process has restarted, bprm->sh_bang is not
zero (line 25 of the file), and the function returns ENOEXEC. This
explains why a shell script cannot be the interpreter for a shell script.
What is not explaine
Amir Hardon <[EMAIL PROTECTED]> writes:
> I'm looking for a way to create a simple click-n'-forget icon on a
> Windows(98) machine, that will invoke a shell script on a Linux
> server. The only solution I can think of that doesn't involve
> writing a client-ser
Amir -
Perhaps you might want to use the "magic scripts" in a Samba server
(http://www.oreilly.com/catalog/samba/chapter/book/ch08_02.html )
Amir Hardon wrote:
I'm looking for a way to create a simple click-n'-forget icon on a Windows(98)
machine, that will invoke a she
Amir Hardon wrote:
I'm looking for a way to create a simple click-n'-forget icon on a Windows(98)
machine, that will invoke a shell script on a Linux server.
The only solution I can think of that doesn't involve writing a client-server
application specific for this task, is using
On Sun, Nov 21, 2004 at 08:41:48PM +0200, Amir Hardon wrote:
> I'm looking for a way to create a simple click-n'-forget icon on a Windows(98)
> machine, that will invoke a shell script on a Linux server.
> The only solution I can think of that doesn't involve writing a clie
I'm looking for a way to create a simple click-n'-forget icon on a Windows(98)
machine, that will invoke a shell script on a Linux server.
The only solution I can think of that doesn't involve writing a client-server
application specific for this task, is using ssh+putty, bu
On Wed, 25 Sep 2002, Nadav Har'El wrote:
> On Wed, Sep 25, 2002, Shlomi Fish wrote about "Re: Help with a Bourne Shell Script":
> > Sometimes I do "expr 5 \> 6 > /dev/null" instead.
>
> Well, you shouldn't... Expr wasn't meant for these ki
On Wed, Sep 25, 2002, Shlomi Fish wrote about "Re: Help with a Bourne Shell Script":
> Sometimes I do "expr 5 \> 6 > /dev/null" instead.
Well, you shouldn't... Expr wasn't meant for these kinds of things, and
you just saw how this can cause you bugs. Do &q
On Wed, 25 Sep 2002, Nadav Har'El wrote:
> On Wed, Sep 25, 2002, Shlomi Fish wrote about "Help with a Bourne Shell Script":
> > http://t2.technion.ac.il/~shlomif/fetchweb
> > My problem is that proc_args does not return the new command line.
>
> That'
On Wed, Sep 25, 2002, Shlomi Fish wrote about "Help with a Bourne Shell Script":
> http://t2.technion.ac.il/~shlomif/fetchweb
> My problem is that proc_args does not return the new command line.
That's because parse_args returned "0\n0\nyour arguments" instead of
On Wed, Sep 25, 2002 at 09:56:34AM +0300, Shlomi Fish wrote:
>
> Check:
>
> http://t2.technion.ac.il/~shlomif/fetchweb
>
> My problem is that proc_args does not return the new command line.
You probably meant 'test' and not expr in line 54.
expr, besides setting the return value, also outputs
Check:
http://t2.technion.ac.il/~shlomif/fetchweb
My problem is that proc_args does not return the new command line.
Regards,
Shlomi Fish
--
Shlomi Fish[EMAIL PROTECTED]
Home Page: http://t2.technio
On Sat, 8 Jul 2000, Shaul Karl wrote:
> The TkMan Makefile claims that with Linux apropos is a shell script.
> This is not the case with my Debian Linux.
> I tend to think that it is also an ELF executable on other distros.
> Before mailing the author about it I would like to veri
On Sat, Jul 08, 2000 at 11:40:48AM +0300, Shaul Karl wrote:
> The TkMan Makefile claims that with Linux apropos is a shell script.
> This is not the case with my Debian Linux.
> I tend to think that it is also an ELF executable on other distros.
> Before mailing the author about it
The TkMan Makefile claims that with Linux apropos is a shell script.
This is not the case with my Debian Linux.
I tend to think that it is also an ELF executable on other distros.
Before mailing the author about it I would like to verify that. Can you check
it on your non Debian distros and let
On Sun, 11 Apr 1999, Peter L. Peres wrote:
> >MYVARIABLE=`telnet some.host.name 1234 | grep "the interesting line" | ..`
>
> With current bash/telnet this does not work as expected. Telnet chokes if
> its stdin is not a tty. Ihad to do things like `yes|telnet somewhere|...`.
Just use netcat th
"Peter L. Peres" wrote:
> >MYVARIABLE=`telnet some.host.name 1234 | grep "the interesting line" | ..`
>
> With current bash/telnet this does not work as expected. Telnet chokes if
> its stdin is not a tty. I had to do things like `yes|telnet somewhere|...`.
http://pobox.com/~djb/software/ptyge
On Sat, 10 Apr 1999, guy keren wrote:
>On Thu, 8 Apr 1999, Alex Shnitman wrote:
>
>> > Does anyone know how to connect to a remote host by telnet using a shell
>> > script ?
>> > I need to get some data using a telnet.
>>
>> man expect
>>
On Thu, Apr 08, 1999 at 08:56:18PM +0300, I wrote:
> > Does anyone know how to connect to a remote host by telnet using a shell
> > script ?
> > I need to get some data using a telnet.
>
> % perl -pe 'sleep 2' < data-file | telnet host
Oh, and, of course,
On Thu, 8 Apr 1999, Alex Shnitman wrote:
> > Does anyone know how to connect to a remote host by telnet using a shell
> > script ?
> > I need to get some data using a telnet.
>
> man expect
> Should get you started in 15 minutes.
actually, you're throwing in
On Thu, Apr 08, 1999 at 02:37:20PM +0300, Mike wrote:
> Hi all
> Does anyone know how to connect to a remote host by telnet using a shell
> script ?
> I need to get some data using a telnet.
Everybody's gonna laugh, but here's a quick'n'dirty way:
% cat>
On Thu, 8 Apr 1999, Mike wrote:
>Hi all
>Does anyone know how to connect to a remote host by telnet using a shell
>script ?
>I need to get some data using a telnet.
Check out expect and xt.
Peter
On Thu, 8 Apr 1999, Mike wrote:
Use expect
--Ariel
> Hi all
> Does anyone know how to connect to a remote host by telnet using a shell
> script ?
> I need to get some data using a telnet.
>
> T
Mike writes:
> Does anyone know how to connect to a remote host by telnet using a shell
> script ?
> I need to get some data using a telnet.
man expect
Should get you started in 15 minutes.
--
Alex Shnitman| http://www.debian.org
[EMAIL PROTECTED
Hi all
Does anyone know how to connect to a remote host by telnet using a shell
script ?
I need to get some data using a telnet.
Thank you
Mike
52 matches
Mail list logo