![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| function and pipe | Orbix | UNIX for Dummies Questions & Answers | 2 | 01-01-2008 12:57 AM |
| Replace a Pipe with tab | srikanthus2002 | Shell Programming and Scripting | 1 | 04-25-2007 03:22 AM |
| Named PIPE | Tamil | UNIX for Dummies Questions & Answers | 2 | 01-17-2007 12:20 AM |
| Problem with pipe into sed | 98_1LE | Shell Programming and Scripting | 2 | 08-13-2005 01:40 PM |
| pipe help | bb666 | High Level Programming | 5 | 02-26-2002 01:07 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
PIpe Spy
Im trying to get my program to behave in this way:
prog 1 | ./pipespy myfile.dat | prog2 the standard output of prog1 is supplied as the input to prog2 and copied into file myfile.dat. need help |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You want the tee command.
Code:
prog 1 | tee myfile.dat | prog 2 Code:
prog 1 | tee -a myfile.dat | prog 2 |
|
#3
|
|||
|
|||
|
pipespy is a C++ program i was thinking of writing.
you prog1 and prog2 what type of files should it be? like should it be a C++ program,or just like text file? |
|
#4
|
||||
|
||||
|
Quote:
|
|
#5
|
|||
|
|||
|
Perhaps it could work out this way:
prog 1 | ./pipespy myfile.dat | prog2 The executable 'pipespy' should read the standard input and before writing the data to standard output store it within a file named 'myfile.dat'
__________________
Regards, Satya Prakash Prasad |
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
|||
|
|||
|
hey guys,thanks for a all your help,but i cant seem to get it working.i created prog1 and prog2 has a .txt file,and i keep getting
aspasia$ prog1.txt | tee -a myfile.dat | prog2.txt -bash: prog1.txt: command not found -bash: prog2.txt: command not found any suggestions? |
|||
| Google The UNIX and Linux Forums |