Created
November 16, 2014 20:47
-
-
Save mxwell/a9c3c3ff2b4bf4f314c8 to your computer and use it in GitHub Desktop.
Create tmux session for contest
This file contains hidden or 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/sh | |
# create session for round | |
if [ -z "$1" ]; then | |
echo "Round name is missing" | |
exit 1 | |
fi | |
mkdir $1 | |
cd $1 | |
mkdir a b c d e | |
cd a | |
# create session with window A | |
tmux new-session -n 'A' -s $1 -d | |
# create other windows: B, C, D, E | |
cd ../b | |
tmux new-window -n 'B' | |
cd ../c | |
tmux neww -n 'C' | |
cd ../d | |
tmux neww -n 'D' | |
cd ../e | |
tmux neww -n 'E' | |
# return to A | |
tmux next | |
# go for work | |
tmux attach-session |
Author
mxwell
commented
Jan 15, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment