文章90
标签1
分类38

创建窗口,批量执行语句

for i in {1..15}; do
tmux split-window -h
tmux select-layout tiled
done
tmux select-pane -t 0
for i in {1..4}; do
for j in {1..4}; do
tmux split-window -v
tmux select-layout tiled
done
tmux select-pane -t $((i*4))
done
tmux attach -t 名字
tmux select-layout tiled
for i in {0..15}; do
tmux select-pane -t $i
tmux send-keys C-c # Ctrl+C
tmux send-keys Enter
done
tmux attach -t 名字
tmux attach -t 名字
tmux select-layout tiled
for i in {0..15}; do
tmux select-pane -t $i
tmux send-keys "cd 路径$((i+1))" Enter
done
tmux attach -t 名字
tmux attach -t 名字
tmux select-layout tiled
for i in {0..15}; do
tmux select-pane -t $i
tmux send-keys "python main.py" Enter
sleep 3
tmux send-keys "120" Enter
sleep 3
tmux send-keys "1" Enter
sleep 3
done
tmux attach -t 名字

    0 评论

    ">