sh3.sh

来自「几个linux试验的脚本编程」· Shell 代码 · 共 34 行

SH
34
字号
echo "Welcome to use the net tool program:"PS3="choice?"select choice in ping nslook netstat route traceroute exitdocase $choice inping) echo "please key in filename:"read file1if [ -f $file1 ]then   echo ""else   exit 1fiii=`cat $file1 | awk '{print $1}' | grep '^202\.[1-2][0-2][0-9]'`for uu in $iidoping -c 1 $uu >>123.txtdone;;nslook) echo "key in hostname"read hhecho "key in $hh"nslookup $hh;;netstat) netstat -t;;route) route -e;;traceroute) echo "key in host"read hh1traceroute $hh1;;exit) echo "bye!"break;;esacdone

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?