Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1) The unix kernel can run lots of processes. Perhaps you could use one process for each direction? 2) If you do use 2 processes, and one is the child of the other then they will start with the same file descriptors. 3) If you restrict yourself to a vt220/xterm type system then there are escape sequences which save and restore the cursor position, query the position. There is also the concept of scrolling region which can give you your boxes. So you could set up a scrolling region and read a line and print it to a fifo or file in one process, and in a second you could read the file ... cont Commented Nov 20, 2016 at 5:58
  • using tail -f. Each time tail gave you something you could output the codes to save the cursor, change the scrolling region to the "output box", move the cursor to the bottom of the output box, output what you got from tail, change the scrolling region back to the input box, and restore the cursor. Not 100% foolproof, as someone typing whilst stuff is being output might end up in the wrong box, but not much with the speed of modern machines. The original cu program used 2 processes. Commented Nov 20, 2016 at 6:05
  • The simplest way is going to be to use something like tmux. Commented Nov 20, 2016 at 7:23
  • 1
    The simplest is going to be use talk. Commented Nov 21, 2016 at 0:11