I think you are all right.. it was running the script properly from command line as it understood the Autosys command but from Apache server it was not. So I added an additional sourcing of Autosys from my wrapper CGI and it worked. thanks so much for your replies. I am not a perl expert at all.. Just learning.. so couldnt understand things clearly. thanks again for all the helpp.

I have problem with my CGI perl script. Below is the code i have post the table tag closure. Before this table, ofcourse I have the BODY tag still open.

# Autosys command @job_run = `autorep -J my_job_name -w`; print "<PRE><FONT SIZE=3>\n"; foreach $job_line (@job_run) { print "'$job_line'"; } print "</FONT></PRE>\n";
Command line output:
<PRE><FONT SIZE=3> Job Name Last +Start Last End ST Run Pri/Xit ________________________________________________________________ _____ +_______________ ____________________ __ _______ ___ my_job_name 02/05/2015 03:54:02 + ----- RU 70730069/1 </FONT></PRE> </CENTER></BODY></HTML>
the same code, i paste in HTML source, i see the display of this run details. But when I run this code in my frame on HTML page when I open the source and see, this is what I see:
<PRE><FONT SIZE=3> </FONT></PRE> </CENTER></BODY></HTML>
Please help.


In reply to Html not printing my shell command output by mshreya

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.