From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S3YGy-0007Wr-Mh for garchives@archives.gentoo.org; Fri, 02 Mar 2012 19:36:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 26F43E0920; Fri, 2 Mar 2012 19:35:54 +0000 (UTC) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 1CCB7E09A9 for ; Fri, 2 Mar 2012 19:33:14 +0000 (UTC) Received: by werm13 with SMTP id m13so1495200wer.40 for ; Fri, 02 Mar 2012 11:33:14 -0800 (PST) Received-SPF: pass (google.com: domain of paul.hartman@gmail.com designates 10.180.92.71 as permitted sender) client-ip=10.180.92.71; Authentication-Results: mr.google.com; spf=pass (google.com: domain of paul.hartman@gmail.com designates 10.180.92.71 as permitted sender) smtp.mail=paul.hartman@gmail.com; dkim=pass header.i=paul.hartman@gmail.com Received: from mr.google.com ([10.180.92.71]) by 10.180.92.71 with SMTP id ck7mr9977760wib.3.1330716794362 (num_hops = 1); Fri, 02 Mar 2012 11:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=ZzyTlCJiI3kW2IDK0AKP1zYsouE8HowrpC4LKkS8J+0=; b=cyX9hdITelYW8vcXGOdsM3u/jqJQG4lrYJpVSZbP+P4AVeJhq+SxhpwXBV9VgrmOHX l9naQmsdREBY7ObOWRxg8VXZ7E3EWugEXeO3Wijf3efbO1SKAMwcjyp/+t/bteAUx90Z W4TjjqsvvP/quS9TPhe/StGxIx0YA7JCQYTmnrj3Yooa1BUr49AHRIyQG/X6XAvDBgGu neh5osyz9eopsQexJyX7EQrtdClSe3ibNpZma+lbmcfsh6JpqMuZFO0UPdO3Ax3jxGZl XHiAkG8ektQu63y/p6KEgu3uB5cJzELYPBZI3PaZm2wFeabSRwud92jiZ/uDmqHb4EEq ZMLA== Received: by 10.180.92.71 with SMTP id ck7mr8024380wib.3.1330716794202; Fri, 02 Mar 2012 11:33:14 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Sender: paul.hartman@gmail.com Received: by 10.227.130.194 with HTTP; Fri, 2 Mar 2012 11:32:54 -0800 (PST) In-Reply-To: References: <4F51076A.9020403@libertytrek.org> From: Paul Hartman Date: Fri, 2 Mar 2012 13:32:54 -0600 X-Google-Sender-Auth: uEGV1XJ3DBOfn6UO-MKpOYvvhMI Message-ID: Subject: Re: [gentoo-user] Filter grep output of 'ps aux' To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 X-Archives-Salt: ce14c62a-ecdf-4d80-a7b8-433883710a11 X-Archives-Hash: 26ba838f4cbe165e580f092b11400119 On Fri, Mar 2, 2012 at 12:24 PM, Pandu Poluan wrote: > > On Mar 3, 2012 1:07 AM, "Paul Hartman" > wrote: >> >> On Fri, Mar 2, 2012 at 11:46 AM, Tanstaafl >> 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 ;)