1 2 3 4 5 6 7 8 9 10
#!/bin/bash if [ $# == 0 ]; then TARGET=${0#*-} else TARGET=$1 fi scp $(dirname $0)/screenrc $TARGET-mgr: ssh $TARGET-mgr -t screen -x -R -S ttyS1 -c screenrc /dev/ttyS1