From owner-freebsd-questions@FreeBSD.ORG Tue Feb 27 16:46:13 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F52516A401 for ; Tue, 27 Feb 2007 16:46:13 +0000 (UTC) (envelope-from r.m.graham@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by mx1.freebsd.org (Postfix) with ESMTP id 1069C13C46B for ; Tue, 27 Feb 2007 16:46:12 +0000 (UTC) (envelope-from r.m.graham@gmail.com) Received: by wr-out-0506.google.com with SMTP id 55so2435033wri for ; Tue, 27 Feb 2007 08:46:12 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mGCXObLcykEz3gk28lkVVrtf7jHbfiIF44oURC0toSPoifWTBxZO10/8rsv1ZRGutfmXrVfulbXIFETMRDivqShT+aD+2vVb5Piu2VXcq0JZLeKr5I7sZqAqLqbxmvgyRsHvCU7oJceW2x3KkrFfglfFttINuwH1ZheZTah5Ld0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FmlFgDxZR8/iFzO9xRZESfUh4cv+JQfaxallbSdA+5A886qNjfeXd01Vvf3lgBlAatiw3boDsnyZi6bt29EUm72S/SMcP1YxwNe8xqFvrJ2pGrsRjq3bcW3x7i/kMXQSf5yC+WyiMEghZ2WTxEsiuFePO+8/xlijoogLlAI+Xoo= Received: by 10.115.32.1 with SMTP id k1mr382711waj.1172594082707; Tue, 27 Feb 2007 08:34:42 -0800 (PST) Received: by 10.115.19.10 with HTTP; Tue, 27 Feb 2007 08:34:42 -0800 (PST) Message-ID: <93e244cc0702270834r3985e438we4117c98b78d246d@mail.gmail.com> Date: Tue, 27 Feb 2007 08:34:42 -0800 From: "Ryan Graham" To: linuxusersgroup@googlegroups.com In-Reply-To: <26face530702261927w553488a1uae8629aa3d827497@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <26face530702261927w553488a1uae8629aa3d827497@mail.gmail.com> Cc: freebsd-questions@freebsd.org, nmosug-l@mailman.swcp.com, nmlug@nmlug.org Subject: Re: [lug:7827] Effectively detaching 'less' from a pipe 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, 27 Feb 2007 16:46:13 -0000 Check the man pages for tee and head. From your description, they may work better. If nothing else, you can probably figure out something better than what you're doing now. And please don't cross-post. I highly doubt everyone on all those lists/groups is subscribed to all the others. ~Ryan On 2/26/07, Kelly Jones wrote: > > I often run commands piped to 'less', to make sure the command is > working OK by looking at the first few lines of output. > > Once I'm convinced, though, I'd like to "get rid" of less, and just > have the rest of stdout spewed to the terminal (and/or /dev/null > and/or to a file I specify). > > In other words, I want to stop hitting 'space' until my program terminates. > > How can I do this? > > My current kludges (both ugly): > > 1. do "command > file" and then "tail -f file | less" (this mostly > works, but takes a while to get started because of buffering issues) > > 2. do "command | less", and once I'm happy w/ the output, hit 'q' to > quit less (and thus terminate program) and then do "command > > /dev/null" (works, but wastes time, since I have to run the command > once just to look at the first few lines and then abort it) >