Redirection

Redirection

am 16.01.2008 13:44:54 von clement

can i redirect one terminal output to another terminal... i know pipe
concept.. but it can be done in the same terminla... but what i want
is "I want to use one terminal for my input and another one for
output... and a file for collection errors..."

stdout: second terminal
stdin: first terminal
stderr: file

How can i do this.......?

Re: Redirection

am 16.01.2008 14:29:15 von Janis Papanagnou

On 16 Jan., 13:44, Clement wrote:
> can i redirect one terminal output to another terminal... i know pipe
> concept.. but it can be done in the same terminla... but what i want
> is "I want to use one terminal for my input and another one for
> output... and a file for collection errors..."
>
> stdout: second terminal

Yes, but depending on where your "second terminal" is located;
you can redirect output on the same machine using redirection to
the devices, like /dev/pts/3 or /dev/tty2, to name two examples.

> stdin: first terminal
> stderr: file

A regular redirection.

>
> How can i do this.......?

An example (there may be simpler solutions)...

your_process &1 >/dev/pts/3 | tee error_file >/dev/null

....expecting input from /dev/tty2, stdout goes to /dev/pts/3, and
stderr
to error_file.

Janis