From owner-freebsd-questions@FreeBSD.ORG Tue Jun 9 06:41:22 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 B922F106564A for ; Tue, 9 Jun 2009 06:41:22 +0000 (UTC) (envelope-from npapke@acm.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 844558FC1B for ; Tue, 9 Jun 2009 06:41:22 +0000 (UTC) (envelope-from npapke@acm.org) Received: from pd2ml1so-ssvc.prod.shaw.ca ([10.0.141.139]) by pd3mo1so-svcs.prod.shaw.ca with ESMTP; 09 Jun 2009 00:13:01 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=0 a=lvbMJxvVAAAA:8 a=9xbP4PelcJ1ykLK2Sq0A:9 a=RvQlW2vxNYfmUs7kSm0ldPxC2rcA:4 a=nAPXUAfsBmEA:10 a=zPywJwoN2wMA:10 a=Q2_-hNh_UqoA:10 Received: from unknown (HELO proven.lan) ([24.85.241.34]) by pd2ml1so-dmz.prod.shaw.ca with ESMTP; 09 Jun 2009 00:13:01 -0600 Received: from proven.lan (localhost [127.0.0.1]) by proven.lan (8.14.3/8.14.3) with ESMTP id n596D1Sa033914; Mon, 8 Jun 2009 23:13:01 -0700 (PDT) (envelope-from npapke@acm.org) Received: from localhost (localhost [[UNIX: localhost]]) by proven.lan (8.14.3/8.14.3/Submit) id n596D1n6033913; Mon, 8 Jun 2009 23:13:01 -0700 (PDT) (envelope-from npapke@acm.org) X-Authentication-Warning: proven.lan: npapke set sender to npapke@acm.org using -f From: Norbert Papke Organization: Archaeological Filing To: freebsd-questions@freebsd.org Date: Mon, 8 Jun 2009 23:13:00 -0700 User-Agent: KMail/1.9.10 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906082313.01084.npapke@acm.org> Cc: 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 06:41:23 -0000 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. -- Norbert Papke. npapke@acm.org http://saveournet.ca Protecting your Internet's level playing field