Date: Tue, 27 Feb 2007 08:34:42 -0800 From: "Ryan Graham" <r.m.graham@gmail.com> To: linuxusersgroup@googlegroups.com Cc: freebsd-questions@freebsd.org, nmosug-l@mailman.swcp.com, nmlug@nmlug.org Subject: Re: [lug:7827] Effectively detaching 'less' from a pipe Message-ID: <93e244cc0702270834r3985e438we4117c98b78d246d@mail.gmail.com> In-Reply-To: <26face530702261927w553488a1uae8629aa3d827497@mail.gmail.com> References: <26face530702261927w553488a1uae8629aa3d827497@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <kelly.terry.jones@gmail.com> 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) >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?93e244cc0702270834r3985e438we4117c98b78d246d>