home Mail List
Info
Info
Meetings
Goals
Upcoming
Projects
FAQ
Security
Links

[Date Prev][Date Next] [Chronological] [Thread] [Top]

[NMLUG] Effectively detaching 'less' from a pipe



the "tee" command might help you do what you want.


On 2/26/07, Kelly Jones <kelly.terry.jones at 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)
>
> --
> We're just a Bunch Of Regular Guys, a collective group that's trying
> to understand and assimilate technology. We feel that resistance to
> new ideas and technology is unwise and ultimately futile.
> _______________________________________________
> NMLUG mailing list
> NMLUG at nmlug.org
> http://www.nmlug.org/mailman/listinfo/nmlug
>



-- 
Matthew Bowie
Programmer/IT Consultant
niosop at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nmlug.org/pipermail/nmlug/attachments/20070226/57141ec8/attachment.htm 




Please send sugestions and comments to webmaster@nmlug.org.
Valid XHTML 1.1! Valid CSS! Powered by Debian Powered by Apache