Hey Monks, I am trying to write a script that scans UNIX processes (that gather log data). When all the processes are done, then we compile the data and generate a report. The challenge is that PS only allows up to 80 characters. I am trying to add a unique ID to the filename. Is there a way to extract more than 80 characters out of PS. Cheers! Robert PS. Here's the code I am using to check to see whether the processes have finished or not....
#__________________________________________________________________ # # logmining'check: Check to see if the logs are still processing. + #__________________________________________________________________ sub logmining'check { my ($pid) = @_; print STDERR "CHECK: ps -ef | grep $pid.log\n\n"; #&logmining'finish (); my $ps_check = `ps -ef | grep $pid.log`; while ($ps_check =~ m|gunzip|) { sleep (60); $ps_check = `ps -ef | grep $pid.log`; if ($ps_check !~ m|gunzip|) { $ps_check = ''; &logmining'finish (); last; } } }

In reply to How to get more than 80 characters out of PS by rzs96

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.