标签:
这是我在ST写的用来自动打开机顶盒的脚本
#!/bin/bash
init_stb() {
xdotool type "telnet 10.80.117.$1"
xdotool key Return
sleep 1
xdotool type "root"
xdotool key Return
sleep 1
xdotool type "cd app0"
xdotool key Return
sleep 1
xdotool type "ifconfig eth0 mtu 1500"
xdotool key Return
xdotool type "date"
xdotool key Return
sleep 1
xdotool type "date -s "
xdotool click 2
xdotool key Return
sleep 1
xdotool type "cd /app0/conf_files/"
xdotool key Return
sleep 1
xdotool type "sh runedva.sh"
xdotool key Return
}
xdotool key ctrl+shift+t
xdotool type "date +%m%d%H%M%Y > currenttime12345"
xdotool key Return
xdotool type "xclip -i currenttime12345"
xdotool key Return
xdotool type "rm -f currenttime12345"
xdotool key Return
if [ "$1" == "" ]; then
init_stb 36
xdotool key ctrl+shift+t
init_stb 37
else
init_stb $1
fi
标签:
原文地址:http://www.cnblogs.com/xieqianli/p/4219695.html