#!/bin/sh if [ $# -lt 1 ] ; then echo "Usage: $(basename $0) HOST [ SESSION_NAME ]" >&2 elif [ $# -eq 1 ] ; then mosh $1 -- tmux new-session else mosh $1 -- tmux new-session -A -s $2 fi