1 |
On Fri, Mar 2, 2012 at 12:24 PM, Pandu Poluan <pandu@××××××.info> wrote: |
2 |
> |
3 |
> On Mar 3, 2012 1:07 AM, "Paul Hartman" <paul.hartman+gentoo@×××××.com> |
4 |
> wrote: |
5 |
>> |
6 |
>> On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafl <tanstaafl@×××××××××××.org> |
7 |
>> wrote: |
8 |
>> > Does anyone know if there is a way to filter the output of ps aux to |
9 |
>> > show |
10 |
>> > only lines that have a value in the %CPU column higher than x - ie, 1.0, |
11 |
>> > or |
12 |
>> > 2.0, or something like that? |
13 |
>> |
14 |
>> ps aux | gawk '{ if ( $3 > 1.0 ) { print } }' |
15 |
>> |
16 |
> |
17 |
> Why would you use "if"? You can easily use this : |
18 |
> |
19 |
> ps aux | awk '$3 > 1.0 {print}' |
20 |
|
21 |
because I don't know awk very well ;) |