4

I have two programs A and B. I want a single command, which will run Program A and Program B in two different terminals but in the same tab, i.e, in a horizontally split terminal. I know screen can do that but I have to manually enter C-a S, C-a tab, C-a c to invoke, switch and run the programs. If I want to do so in a single command, is it possible?

Hennes
  • 65,804
  • 7
  • 115
  • 169

2 Answers2

3

A simple .screenrc to accomplish this might look something like this:

# whatever other normal entries you have for options and other configuration
sessionname some_descriptive_name
screen 0 first_command
split
focus down
screen 1 second_command

That splits the screen vertically, though... Not sure how to split horizontally, but I'll update later if I figure it out...

Edit: use split -v to split horizontally (the split line is vertical, so you have left/right instead of top/bottom).

twalberg
  • 276
-1

iTerm can do that with a shell command.