From: Pandu Poluan <pandu@poluan.info>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Filter grep output of 'ps aux'
Date: Sat, 3 Mar 2012 01:24:14 +0700 [thread overview]
Message-ID: <CAA2qdGVF08n3FgF45yRhDSm0iQk5g0yhnirU6iGy1wG53oy=iA@mail.gmail.com> (raw)
In-Reply-To: <CAEH5T2Pqfr2S3BOOkuCA=G3e3V7xYEp34-Y9OrsejpOXBW2cBA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
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}'
Rgds,
[-- Attachment #2: Type: text/html, Size: 749 bytes --]
next prev parent reply other threads:[~2012-03-02 18:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 17:46 [gentoo-user] Filter grep output of 'ps aux' Tanstaafl
2012-03-02 17:56 ` Pandu Poluan
2012-03-02 18:03 ` Tanstaafl
2012-03-02 18:12 ` Jason
2012-03-02 18:32 ` Tanstaafl
2012-03-02 19:33 ` Paul Hartman
2012-03-02 20:39 ` Tanstaafl
2012-03-02 20:50 ` Paul Hartman
2012-03-02 21:23 ` Tanstaafl
2012-03-02 21:52 ` Paul Hartman
2012-03-03 13:00 ` Tanstaafl
2012-03-02 18:02 ` Paul Hartman
2012-03-02 18:12 ` Tanstaafl
2012-03-02 18:30 ` Alan McKinnon
2012-03-02 18:24 ` Pandu Poluan [this message]
2012-03-02 19:32 ` Paul Hartman
2012-03-02 19:40 ` [gentoo-user] " Grant Edwards
2012-03-03 2:16 ` Pandu Poluan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA2qdGVF08n3FgF45yRhDSm0iQk5g0yhnirU6iGy1wG53oy=iA@mail.gmail.com' \
--to=pandu@poluan.info \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox