If you are already in tmux session, you can execute some command in new window like below:
$ tmux neww {command}
Also, if you want to split window and execute command:
$ tmux splitw {command}
Here's some example of running tail -f for several files in the log directory:
$ find logs/ -name '*.log' | xargs -n1 -I{} bash -c 'tmux splitw "tail -f $1"; tmux select-layout main-vertical' -- {}
tmux select-layout
part is for fixing pane layout.
added as per comment:
You can use:
$ tmux new {command}
If you aren't in tmux session. So you can combine these like this.
test.sh:
tmux new -s foo "bash tmux-test.sh; wait"
tmux-test.sh:
tmux neww htop
tmux neww htop
tmux splitw htop
and then execute test.sh