If Shlomo uses X-Window, then he can have his script write its stuff to a file. Then in another window, he can run: tail -f script-output-file and in a third window, he can run: tail -f script-output-file | grep whatever\.\*pattern --- Omer My opinions, as expressed in this E-mail message, are mine alone. They do not represent the official policy of any organization with which I may be affiliated in any way. WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
On Thu, 13 Mar 2003, Alex Chudnovsky wrote: > On Thursday 13 March 2003 23:11, shlomo solomon wrote: > > Hi, > > > > I have a script that puts a lot of output on the screen. I want to look for > > a particular string in the output, so I pipe the output to GREP. That works > > fine, but here's the problem. I also want to see the output on the > > terminal, and the pipe to GREP means I only get to see the line that > > matches the string I'm looking for - not **ALL** the screen output. Is > > there a way to see output on the screen AND pipe it to GREP at the same > > time? > Use "tee". Kludge but works. > > > > BTW - I have a partial solution and that's to pipe to a file and then do 2 > > separate operations - cat the file to the screen and GREP the file to find > > what I'm looking for. The problem is that I then see the output only after > > the script has finished running - not **online**. > > > > Any ideas?- TIA > Two solutions : > - Pipe the output to "less" - it has a search facility - press "/", enter the > pattern and here you go > - "Tee" the output to the terminal ( it is Unix clone, after all, each device > is a file). > my_script | tee terminal_device | grep some_string ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]