-
-
Save shutingrz/35c6320e9622eb7c0a22 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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