From owner-freebsd-questions@FreeBSD.ORG Wed Jun 10 11:34:38 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 870AA106566C for ; Wed, 10 Jun 2009 11:34:38 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from mailout.zetnet.co.uk (mailout.zetnet.co.uk [194.247.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id 3EAE78FC1D for ; Wed, 10 Jun 2009 11:34:38 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from irwell.zetnet.co.uk ([194.247.47.48] helo=zetnet.co.uk) by mailout.zetnet.co.uk with esmtp (Exim 4.63) (envelope-from ) id 1MEM4g-0003cx-0j; Wed, 10 Jun 2009 12:34:34 +0100 Received: from melon.esperance-linux.co.uk (54-144.adsl.zetnet.co.uk [194.247.54.144]) by zetnet.co.uk (8.14.1/8.14.1/Debian-9) with ESMTP id n5ABYXaZ012627; Wed, 10 Jun 2009 12:34:33 +0100 Received: by melon.esperance-linux.co.uk (Postfix, from userid 1001) id 5FA01FCA505; Wed, 10 Jun 2009 12:34:28 +0100 (BST) Date: Wed, 10 Jun 2009 12:34:28 +0100 From: Frank Shute To: Norbert Papke Message-ID: <20090610113428.GA17212@melon.esperance-linux.co.uk> Mail-Followup-To: Norbert Papke , freebsd-questions@freebsd.org, Daniel Underwood References: <200906082313.01084.npapke@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906082313.01084.npapke@acm.org> User-Agent: Mutt/1.4.2.3i X-Face: *}~{PHnDTzvXPe'wl_-f%!@+r5; VLhb':*DsX%wEOPg\fDrXWQJf|2\,92"DdS%63t*BHDyQ|OWo@Gfjcd72eaN!4%NE{0]p)ihQ1MyFNtWL X-Operating-System: FreeBSD 6.4-RELEASE-p2 i386 X-Organisation: 'http://www.shute.org.uk/' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.7 (zetnet.co.uk [194.247.46.1]); Wed, 10 Jun 2009 12:34:33 +0100 (BST) Cc: freebsd-questions@freebsd.org, Daniel Underwood Subject: Re: Reproduce previous stdout output without running previous command X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Shute List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 11:34:38 -0000 On Mon, Jun 08, 2009 at 11:13:00PM -0700, Norbert Papke wrote: > > On June 8, 2009, Daniel Underwood wrote: > > Further suppose that after running the command, I decide I want to > > save the output to a text file, so I can analyze the results outside > > of the terminal. What can I do? Well, I can do a traditional > > "copy-and-paste", or I could re-enter the previous command and send it > > to a text file (which I ought to have done in the first place). > > > > But is there another option? Is there some variable (such as, > > hypothetically, $output[n], where n=some integer index) that I could > > use to store the results in a text file? Such an option might look > > like the following: > > You could use sysutils/screen from ports. Screen lets you capture your > session in a log file. If you decide you need the output from a previous > command, it would be trivial to extract from the log. > Nobody's mentioned script(1). Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html