#!/bin/sh # SESSION=$(tmux ls -F "#{session_name}") echo $NEW if [ "$SESSION" = "" ]; then tmux attach-session -t default_ssh || tmux new-session -s default_ssh else echo tmux-session \"$SESSION\" already running. fi