Added script attach/create tmux session

This commit is contained in:
dbroqua 2020-07-05 10:29:44 +02:00
parent 4e158b14ab
commit b890907204

15
Bin/attachTmux.sh Executable file
View file

@ -0,0 +1,15 @@
#! /bin/bash
if [ -z "$1" ]; then
echo "Missing session name"
exit 1
fi
TMUXSESSION=$1
EXISTS=`tmux ls|grep "${TMUXSESSION}:"`
if [ -z "${EXISTS}" ]; then
tmux new -s ${TMUXSESSION}
else
tmux attach-session -t ${TMUXSESSION}
fi