On 2012-03-02, Pandu Poluan <[email protected]> wrote:
> On Mar 3, 2012 1:07 AM, "Paul Hartman" <[email protected]>
> wrote:
>>
>> On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafl <[email protected]>
> 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}'
Why would you use "{print}"? You can easily use this:
ps aux | awk '$3 > 1.0'
;)
--
Grant Edwards grant.b.edwards Yow! Kids, don't gross me
at off ... "Adventures with
gmail.com MENTAL HYGIENE" can be
carried too FAR!