Loading ...
Sorry, an error occurred while loading the content.

perl html formatting question

Expand Messages
  • john_20_28_2000@yahoo.com
    I am using perl to return results for the follwing in a web page: print ps -ef | grep named ; The web page returns: named 15581 1 0 11:13 ? 00:00:28 named -u
    Message 1 of 2 , May 4, 2001
    • 0 Attachment
      I am using perl to return results for the follwing in a web page:

      print "ps -ef | grep named";

      The web page returns:

      named 15581 1 0 11:13 ? 00:00:28 named -u named nobody 16229 4013 0
      14:40 ? 00:00:00 sh -c ps -ef | grep named nobody 16231 16229 0
      14:40 ? 00:00:00 grep named

      This is all on one big line in the browser (it wraps though). How
      would I format it so that each line is printed individually like the
      command line:

      named 15581 1 0 11:13 ? 00:00:29 named -u named
      root 16274 16251 0 14:44 pts/5 00:00:00 grep named


      This is how I want it to look. Thanks for any information.
    • Damien Carbery
      Try: # Tell the browser the following is already formatted. print n ; print ps -ef | grep named ; print n n ;
      Message 2 of 2 , May 4, 2001
      • 0 Attachment
        Try:

        # Tell the browser the following is already formatted.
        print "<PRE>\n";
        print "ps -ef | grep named";
        print "\n</PRE>\n";

        --- In perl-beginner@y..., john_20_28_2000@y... wrote:
        > I am using perl to return results for the follwing in a web page:
        >
        > print "ps -ef | grep named";
        >
        > The web page returns:
        >
        > named 15581 1 0 11:13 ? 00:00:28 named -u named nobody 16229 4013 0
        > 14:40 ? 00:00:00 sh -c ps -ef | grep named nobody 16231 16229 0
        > 14:40 ? 00:00:00 grep named
        >
        > This is all on one big line in the browser (it wraps though). How
        > would I format it so that each line is printed individually like the
        > command line:
        >
        > named 15581 1 0 11:13 ? 00:00:29 named -u named
        > root 16274 16251 0 14:44 pts/5 00:00:00 grep named
        >
        >
        > This is how I want it to look. Thanks for any information.
      Your message has been successfully submitted and would be delivered to recipients shortly.