I often need to run two commands (a server with a very chatty console and a terminal to execute commands in that server) in a coordinated way and I'd like to write a single script that will do all of the heavy lifting for me. But I can't quite figure out all the parts. Here's what I want:
1) When I run my script, the current tab is split horizontally into two panes, with one pane occupying the bottom 5 lines and the other taking up the rest. Run the `server` command in the upper pane and the `console` command in the lower pane.
2) When the `console` command exits, gracefully kill the `server` command and un-split the window.
Is this possible?