Hello all...

I have a script (to decompress files) on my local server which i'll ssh to and run (from a local desktop). While running the script via ssh i can see the state of how its working and read the 'print' commands i have in it.

That same script can also be run via 'cgi' from my home apache server (passing the path to the file which needs to be decompressed via url string).

While running the script via 'cgi' (local web server) i can not read any of the 'print' out-put in-till the script is completly finished.

Question
Is there a way to 'print' the out-put of the script while its running in 'cgi', in "real-time" just like it is being run via ssh/terminal window (and not effect how it is currently working in ssh) ?

The reason for running the script via my web server is i do not want to login to the server all the time. I have a second script in the desktops 'nautilus-scripts' folder which lets me "right-click" on a file that is mapped to a shared folder on the server and send the filename off to my browsers url.
I want all the work being done on the decompressed files to take place on the server, i do not want any of the work load to be done on the desktop.

Server = Ubuntu 10.04x
Perl = v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
Apache = 2.2.14 (Ubuntu)

Thanks for any guidance.


In reply to 'print' to cgi like in terminal ("real-time") ? by iMisspell

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.