I notice you still have the space between the dash (-) and the "auwwx". My test code refuses to find "inder" when I leave the space between the dash and the auwwx (and I know for CERTAIN that I'm currently running the Finder), but seems to find it just fine with a standard width (80 chars) window, again when I've shrank my window to 35 chars wide, all the while the output of the command in Terminal is clearly beyond that width:

My-Computer()$ ps -auwwx | grep inder chargrill 255 0.0 2.2 228420 23320 ?? S 16Feb06 1:44.33 + /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder -psn_0 +_917505 chargrill 23153 0.0 0.0 27820 4 p2 R+ 12:08PM 0:00.00 + grep inder My-Computer()$ ps - auwwx | grep inder 23155 p2 R+ 0:00.00 grep inder My-Computer()$

When I type "ps - auwwx", I get nothing like what I expect to see, which is an extra wide listing of all processes from all users running on the computer, instead I see (apparently) only the login (interactive) processes currently running as my user:

My-Computer()$ ps - auwwx PID TT STAT TIME COMMAND 12006 p1 S 0:00.10 -bash 18744 p1 S+ 0:00.22 /usr/bin/perl /usr/bin/perldoc perlop 18753 p1 S+ 0:00.02 /usr/bin/less /tmp/Zf90IVbUVV 12073 p2 S 0:00.69 -bash 3319 p3 Ss+ 0:00.09 -bash 15497 p4 S 0:00.14 -bash 20550 p4 S+ 0:00.21 /usr/bin/perl /usr/bin/perldoc perlvar 20559 p4 S+ 0:00.06 /usr/bin/less /tmp/rTkTg152OS

Vs.

ls-Computer()$ ps -auwwx | more USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME C +OMMAND chargrill 936 6.6 1.6 222620 17208 ?? S 16Feb06 21:48.75 + /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_ +5898241 chargrill 18190 4.1 15.4 477220 161736 ?? S Tue03PM 129:48.52 + /Applications/Safari.app/Contents/MacOS/Safari -psn_0_71303169 windowse 103 3.6 4.0 257112 41960 ?? Ss 16Feb06 352:48.88 +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/C +oreGraphics.framework/Resources/WindowServer -daemon ---<SNIP>---

Please try it getting rid of the space, I beg of you! :-) I've never seen that particular incarnation of command line options to ps. Either with the dash immediately preceeding the options, or leaving the dash out (Linux will complain about a superfluous dash). But not ps_-_auwwx.



--chargrill
$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } + sig map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu +" );

In reply to Re^4: Capture Console Results? by chargrill
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.