1 |
On 2012-03-02 4:52 PM, Paul Hartman <paul.hartman+gentoo@×××××.com> wrote: |
2 |
> On Fri, Mar 2, 2012 at 3:23 PM, Tanstaafl<tanstaafl@×××××××××××.org> wrote: |
3 |
>> Attempt at incorporating your command into this: |
4 |
>> watch -n1 "ps aux --sort=-%cpu | gawk 'NR==1; $3> 0'" |
5 |
>> |
6 |
>> it gives me a syntax error: |
7 |
>> |
8 |
>> Every 1.0s: ps aux --sort=-%cpu | gawk 'NR==1;> 0' |
9 |
>> Fri Mar 2 |
10 |
>> 16:19:01 2012 |
11 |
>> |
12 |
>> gawk: NR==1;> 0 |
13 |
>> gawk: ^ syntax error |
14 |
>> |
15 |
>> Any ideas on how to get this working in the watch version |
16 |
|
17 |
> Put a backslash before the $, it needs to be escaped in that context. |
18 |
|
19 |
Aaargh! I could have sworn I tried that... but yes, now it works |
20 |
perfectly... |
21 |
|
22 |
Thanks Paul - Gentoo support is the best, even for general linux |
23 |
questions like this... |