That didn't work. The console, if the window is a certain size, will wrap the lines but it actually appears to cutoff part of the line (even with the ww added). Can I force resize a window, tell the system to pretend my console is a certain size and not wrap the lines, or is there any other way to disregard the size of the window in the script and get the whole output dumped to memory somewhere?
28066 p3 S+ 353:01.11 perl /Library/WebServer/Documents/perlscr +ipts/refresh/getDat ##This is supposed to be getDataLive.pl script + i want to monitor. 571 std S+ 0:00.05 perl systemcmd.pl ##The name of my script +file 590 std S+ 0:00.02 sh -c ps - auwwx | grep perl 592 std R+ 0:00.00 grep perl
Wondering if I'm making this harder than it has to be. Would like to keep from using launchd, not all the mac platform use launchd for services.
Current code below
open(PS_F, "ps - auwwx | grep perl |") || die "Can't open cons +ole\n"; my @data = <PS_F>; close(PS_F); my $res_data = join(" ",@data); print "Res data is $res_data\n---\n"; my $comm = $res_data; $comm =~ s/\n//g; $comm =~ s/\r//g; if($comm =~ m/getDataLive.pl/i) {

In reply to Re^3: Capture Console Results? by ecuguru
in thread Capture Console Results? by ecuguru

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.