![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to send the output | rogerben | SUN Solaris | 3 | 02-13-2009 10:38 PM |
| Send output of .SH to a function | raj_uk | Shell Programming and Scripting | 3 | 11-25-2008 12:44 PM |
| Easiest way to send output to a debug file? | LordJezo | Shell Programming and Scripting | 2 | 02-17-2006 10:00 AM |
| Unix Pipeline help | netmaster | UNIX for Dummies Questions & Answers | 2 | 11-15-2005 10:42 AM |
| PIPEs and Named PIPEs (FIFO) Buffer size | Jus | Filesystems, Disks and Memory | 1 | 08-20-2004 11:14 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How Unix tee to send pipeline output to 2 pipes ?
Hi,
I would like to process, filter the same ASCII asynchronous live data stream in more than one pipe pipeline. So the one pipeline should filter out some records using grep key word and more than one pipes pipelines each should grep for another key words, each set seperately for each pipe. There is a number of good examples from the net, how to output pipe result to terminal as well as to save to a file, but I need to process the same live data stream by a number of pipes pipelines in parallel and output the results to seperate files on-the-fly. It would work as fork. How can I define a numer of parallel processes, reading the same data stream in parallel , as in the example below ? Jack -------- Since tee can read the standard input, and write to multiple files, we may leverage this feature so that it writes to multiple processes (instead of files). tee >(process1) >(process2) >(process3) | process4 Here's a simple example of how to do this. Run the following command to get a directory listing on your terminal, while also redirecting the output to a file named poop.out: ls -al | tee poop.out echo “hello world” | tee test.txt |
|
||||
|
Quote:
I am looking for any technique to process data streams on-the-fly not creating cache file or not saving data stream into a file for a postprocessing. Frankly speaking I could save each record as a string and process it by another set of instructions. As the same data stream is used for 2-way asynchronous transmission I need to learn how to process live data streams made of a number of 2-way substreams. First flow charting, than algorithm and code finally (selected shell script code as to make it easy to share for discussion with my friends). Jack Last edited by jack2; 03-16-2009 at 05:44 PM.. |
|
||||
|
Quote:
now I have to replace data files by data streams (virtual devices or alike) and build pipelines. I don't know how to create output pipeline. Redirecting file output >> to append to a file I risk generating oversized file. So it should work as output device , like monitor, line printer, serial device or TCP/IP port Does shell support direct writing to a TCP/IP port or serial, virtual port, created and defined by shell self ? Jack |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|