From owner-freebsd-questions@FreeBSD.ORG Sat May 24 11:12:47 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 944C037B401 for ; Sat, 24 May 2003 11:12:47 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBC2B43F3F for ; Sat, 24 May 2003 11:12:46 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h4OICgac019832; Sat, 24 May 2003 13:12:42 -0500 (CDT) (envelope-from dan) Date: Sat, 24 May 2003 13:12:42 -0500 From: Dan Nelson To: lbland Message-ID: <20030524181242.GK46907@dan.emsphone.com> References: <71D66F70-8E10-11D7-A088-0030659A531A@vvi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <71D66F70-8E10-11D7-A088-0030659A531A@vvi.com> X-OS: FreeBSD 5.1-BETA X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: freebsd-questions@freebsd.org 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:12:47 -0000 In the last episode (May 24), lbland said: > 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)? uptime | sed -Ee 's/.*([0-9]+.[0-9]+),.*$/\1/' -- Dan Nelson dnelson@allantgroup.com