Is there any way to automate a bunch of terminals starting up at once. I find myself opening several windows and running the same sequence of commands in various tabs. I'd like to stick all this in a single shell file (so I could keep it in version control, share it, etc) rather than have to add it all to a GUI.

Ideally with iTerm, but automating with any terminal program would be interesting to hear about.

Sure, but I'm trying to run 20 different scripts, one for each pre-defined tab.
–
mahemoffJun 2 '12 at 2:48

1

In your shell script you could base what code is run on what your ttys for that tab is set to. tty will give you that information.
–
dennis.hemplerJun 2 '12 at 3:25

Nice, it's /dev/ttys022, so I could write a script to loop from 001 to 030 for example and call a function like init001 etc. I'm still not sure if there's any way to automate the windows though - ie 4 windows in first terminal, 8 in second, etc.
–
mahemoffJun 2 '12 at 10:11