iremce
iremce

Reputation: 620

How can I make program1 is getting input from promram2 and program2 is getting input from terminal at the same time?

I have a homework. I have to redirect my program input to another of my program wich waits command from terminal:

./mycat | ./mymore

The problem is when I run my program like above, "mymore" can not get commands from terminal. Can anyone tell me how can I make "mymore" getting input from termial and "mycat" from "mymore" in the sane time?

Upvotes: 0

Views: 82

Answers (1)

hugomg
hugomg

Reputation: 69964

I am not sure I really understood your question but if you do

./mymore | ./mycat

then mymore gets its input from the standard input (the terminal) and mycat will gets its input from mymore's output.

Upvotes: 2

Related Questions