redirect input terminal
in a terminal i open a new terminal:
now i have 2 terminal: the main terminal and the second terminal.
Can i redirect the keyboard input from the main to the second?
Re: redirect input terminal
You can redirect both input and output for child processes using coproc. However, it does not work for a Bash terminal, because the input and output are internal to the terminal.
You could have output from the second terminal redirect to a file (I suggest a RAM file; create a temporary file in /run/shm using mktemp), and have the first terminal watch for changes to the file using tail --follow or inotifywait.