From owner-freebsd-questions@FreeBSD.ORG Sat May 24 11:15:55 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85BAD37B401 for ; Sat, 24 May 2003 11:15:55 -0700 (PDT) Received: from ns0.uk.circle.com (ns0.uk.circle.com [212.161.1.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C38A43FAF for ; Sat, 24 May 2003 11:15:54 -0700 (PDT) (envelope-from vince.hoffman@uk.circle.com) Received: from itlonkazlauskas ([10.2.0.22]) by ns0.uk.circle.com (8.12.8/8.12.8) with SMTP id h4OILv4j063407; Sat, 24 May 2003 19:21:58 +0100 (BST) Message-ID: <003501c32220$86a8c090$1600020a@uk.circle.com> From: "Vince Hoffman" To: "lbland" , References: <71D66F70-8E10-11D7-A088-0030659A531A@vvi.com> Date: Sat, 24 May 2003 19:15:48 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Subject: Re: editing uptime output with sed? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 18:15:55 -0000 uptime | sed -e "s/.*\,.*\,.*\,.*\,\(.*\)\,.*/\1/" note: you could do it much better with awk ( uptime | awk -F , '{ print $5 }' ) ps not very free bsd related, you'll do better on an shell scripting group list Vince ----- Original Message ----- From: "lbland" To: Sent: Saturday, May 24, 2003 6:52 PM Subject: editing uptime output with sed? > hi- > > sorry for the generic question... > > how do I take uptime output: > 1:45PM up 6 days, 3:58, 11 users, load averages: 0.30, 0.24, 0.21 > and get the 2nd to last value with sed? (how do I get sed to output > 0.24 to stdout)? > > TIA- > > -lance > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >