public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-user] Filter grep output of 'ps aux'
  @ 2012-03-02 19:32 99%     ` Paul Hartman
  0 siblings, 0 replies; 1+ results
From: Paul Hartman @ 2012-03-02 19:32 UTC (permalink / raw
  To: gentoo-user

On Fri, Mar 2, 2012 at 12:24 PM, Pandu Poluan <pandu@poluan.info> wrote:
>
> On Mar 3, 2012 1:07 AM, "Paul Hartman" <paul.hartman+gentoo@gmail.com>
> wrote:
>>
>> On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafl <tanstaafl@libertytrek.org>
>> wrote:
>> > Does anyone know if there is a way to filter the output of ps aux to
>> > show
>> > only lines that have a value in the %CPU column higher than x - ie, 1.0,
>> > or
>> > 2.0, or something like that?
>>
>> ps aux | gawk '{ if ( $3 > 1.0 ) { print } }'
>>
>
> Why would you use "if"? You can easily use this :
>
> ps aux | awk '$3 > 1.0 {print}'

because I don't know awk very well ;)



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-03-02 17:46     [gentoo-user] Filter grep output of 'ps aux' Tanstaafl
2012-03-02 18:02     ` Paul Hartman
2012-03-02 18:24       ` Pandu Poluan
2012-03-02 19:32 99%     ` Paul Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox