And in the process, made my entire post moot, meaning the time I spent trying to be helpful was wasted. The power to edit posts is sometimes important, but you shouldn't be trying to edit history.
Given the complexity of the piping you are doing, I wonder about why you are invoking perl here at all. Perl has powerful internal structures that are intended as stand-ins for the command line utilities, so it would make a lot more sense to grab the entire output from ps and then filter it in Perl:
for (`ps -ef`) {
my ($user, $pid, $ppid, $c, $stime, $tty, $time, $cmd) = split /\s
++/, $_, 8;
next unless $user eq 'acuser';
...
}
Of course, the output of
ps -ef on my box doesn't have STIME that looks like the date in your command, so you probably want to debug that. You seem to be confusing your various input streams.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.