#!/bin/bash # dtach session script # sockets are in /tmp and prefixed with username [ -z "$1" ] && echo "usage $0 " && exit 1 TAG=/tmp/$1.`whoami` SOCK=$TAG.sock shift # OPTS="-r winch" OPTS"-r ctrl_l" # Attach to old session or start new. dtach -A $SOCK $OPTS "$@"