Last active
April 19, 2016 20:27
-
-
Save skliarpawlo/4cc60837af36e6e3d9201e9efe5c6003 to your computer and use it in GitHub Desktop.
run muliple equal commands under single tmux session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# $1 - session name | |
# $2 - num of processes | |
# $3 - cmd | |
tmux new-session -s $1 -d | |
for i in `seq $2` | |
do | |
tmux select-pane -t $1.0 | |
tmux split-window -v -t $1 "$3" | |
done | |
tmux select-layout -t $1 tiled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment