Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-03-2013, 10:35 PM   #1
LQ Newbie
Registered: Apr 2013
Posts: 6

Rep: Reputation: Disabled
Question How might I grep multiple live outputs?

I'm not the most experienced individual when it comes to Linux or its commands, but let's say I wanted to launch a program and run multiple expressions on its text output, all of which output to a live buffer. How might I do this and separate each expression's output to a separate buffer or separate terminal?

I could probably figure out how to output to separate files, but I want each filter updating in real-time and isolated (not cluttered by the other filters' outputs).
Also, is there any way I can remove a segment of text from the beginning of each line? I haven't looked into that at all yet.

Last edited by smalltock; 12-03-2013 at 10:38 PM.
Old 12-03-2013, 10:57 PM   #2
Senior Member
Registered: Mar 2012
Posts: 1,070

Rep: Reputation: 248Reputation: 248Reputation: 248
You could dump the raw output to a logfile and run several 'tail -f's piped to appropriate greps or seds or awks or such.
Old 12-03-2013, 11:23 PM   #3
LQ Newbie
Registered: Apr 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you for the speedy response
That could work, but there's something else that I'd prefer to do if at all possible.
Am I able to pipe ALL output from one terminal into two others? And if so, could I have two different grep expressions running in each destination terminal? I'm using the terminator terminal, by the way, but if there is a universal solution, that'd be fantastic.
Old 12-05-2013, 12:04 AM   #4
Registered: May 2013
Distribution: Arch Linux
Posts: 86

Rep: Reputation: Disabled
Yes, you can use tail -f from multiple terminals and use separate grep expressions on each one if you wanted to. Linux is too versatile to only have one solution.

Last edited by wstewart90; 12-05-2013 at 12:12 AM.
1 members found this post helpful.
Old 12-07-2013, 07:43 AM   #5
LQ Newbie
Registered: Apr 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes! That's fantastic! Thank you very much


buffer, grep, live, output, program

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
grep to file outputs more than grep to screen? tcpman Linux - Server 4 06-07-2013 04:46 AM
piping data to multiple outputs wjtaylor Linux - General 3 03-29-2011 08:34 PM
Multiple grep outputs appended to single row of CSV file findme.krish Linux - Newbie 5 09-12-2010 06:56 PM
RedHat 8.0 multiple sound outputs heathimself Linux - Distributions 2 12-06-2003 02:39 AM
multiple outputs from xmms walrus_55 Linux - Software 0 10-20-2003 12:31 AM

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration