Is there a way to run a single command in all the terminal windows you have open? (I.e. SSHing into a server or something like that?)
If instead you want to run the same set of commands across multiple machines, there are configuration management tools such as Puppet (and others) that will help you do this.
I'm not sure how to do precisely what you're asking, but you might have a look at dsh which lets you send commands to multiple shells at the same time.