Skip to content

Instantly share code, notes, and snippets.

@shutingrz
Created January 13, 2016 15:26
Show Gist options
  • Save shutingrz/35c6320e9622eb7c0a22 to your computer and use it in GitHub Desktop.
Save shutingrz/35c6320e9622eb7c0a22 to your computer and use it in GitHub Desktop.
#!/bin/sh
tty=${1}
if [ "$USER" != "root" ]; then
echo "Please run as superuser or sudo!"
exit 1
fi
if [ $# -ne 1 ]; then
echo "Usage: t [name]"
exit 1
fi
screen_cmd()
{
screen -t ${1} ${2}
}
if [ $tty == "kyoko" ]; then
screen_cmd kyoko /dev/cuau0
elif [ $tty == "shu" ]; then
screen_cmd shu /dev/cuau7
elif [ $tty == "neluse" ]; then
screen_cmd neluse /dev/cuau8
elif [ $tty == "phy" ]; then
screen_cmd phy /dev/cuau9
else
echo "'${tty}' is not found."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment