Skip to content

Instantly share code, notes, and snippets.

@skliarpawlo
Last active April 19, 2016 20:27
Show Gist options
  • Save skliarpawlo/4cc60837af36e6e3d9201e9efe5c6003 to your computer and use it in GitHub Desktop.
Save skliarpawlo/4cc60837af36e6e3d9201e9efe5c6003 to your computer and use it in GitHub Desktop.
run muliple equal commands under single tmux session
#!/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