I have made a short bash script that gets xml data using curl and sends some (it's a chat, in fact) regarding its given arguments. So I can either run the following :

watch --no-title myscript

and therefore keep an eye on what's going on online, or run :

myscript "some message"

The point is, I want to divide the terminal's screen in two part : one with the watch, and one with some kind of prompt/standard input, I don't know, but I want to get rid of the "two tabs in my terminal" stuff and get closer to an actual chat interface. See ?

EDIT : I'm basically looking for the right command to tell screen I want two screens, one above the other. Something like :

screen --number 2 --layout vertical

1 Answer 1


You can use program screen for this issue. http://www.softpanorama.org/Utilities/screen.shtml

Type screen, and it will start. It looks like normal command line, there is no difference, but now, you can use commands for screen: Typing Ctrl+A+[something]

So to divide the screen into to terminal screen vertically, type: Ctrl+A |

If you want it horizontally: Ctrl+A S

Then you can type in actual terminal whatever you want and need:

hostaneme$ watch --no-title myscript

And switch to the next terminal screen by: Ctrl+A [Tab]

Here is nothing yet, firstly the screen has to be created: Ctrl+A C

Promt is shown and you can type what you want.


enter image description here

In the end, there you can have more screen in one place, just create them by Ctrl+A C, and you can change the active one using Ctrl+A N (Or using Ctrl+A 0-9 depending on its number).

Screen has many advantages, for example you needn't close it when you are about logout from the remote server, and you can load it back later.

  • 2
    Yes, I've seen screen is what i'm looking for, but I'd like my script to perform these operation by itself. I know how to create two diferent screens by typing Ctrl+A, but i don't want to do this each time I want to run my chat client...
    – LoremIpsum
    Commented Oct 12, 2011 at 12:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .