#Used for logining logserver quickly!
#Written on xxxx.
#Author:Levin.
HAHA3='Choose which host you want to login:'
echo
iplist=`cat /xxx/xxx/logserver.iplist`
select var in $iplist
do
echo "Your choose is ${var%--->*}."
/usr/bin/ssh -p3121 ${var#*--->}
echo "You have logged out from ${var%--->*}!"
break
done
exit 0
2,脚本中的“HAHA”指的是:P S,注意这两个字母是大写并连在一起的。我之所以这么写,是因为此博客程序过滤掉了它们的组合,被认为是不良语言o(∩_∩)o...哈哈
和select循环用法相关的我都标红了,练习时亲自体验一下用法吧。