shell
cdaniel
这个作者很懒,什么都没留下…
展开
-
shell -select
#!/bin/bash #sh3.sh #PS3="Choice?" Ping(){ echo "Please input ip / Hostname-Ping:exmple 127.0.0.1/www.baidu.com" read temp echo "`ping -c 3 $temp`" choice } Nslookup(){ echo "Please input Hostna原创 2011-12-07 15:04:51 · 332 阅读 · 0 评论 -
shell 四
#!/bin/bash #sh4.sh ladd="/var/log/syslog" t1="tlog" t2="tlogs" tmp="tlog-tmp" mydate=`date +%d%m` bak="log-bak"_$mydate fcp(){ echo `tail -10 $t1 >$tmp` while read line1 do case $line1 in \#*)原创 2011-12-07 15:06:51 · 260 阅读 · 0 评论 -
Shell 简单编程
#!/bin/bash #sh1.sh name="admin" Npass="123" loops=1 filename="dlxxlog.log" logins(){ echo "Your name:" read user echo "Your Password:" read pass } logins #!用户信息导入日志 servermessage(){ `echo "$原创 2011-12-07 14:47:14 · 220 阅读 · 0 评论 -
Shell 编程 2
#!/bin/bash #sh2.sh temp="tempd" #如果用户在线 isAt(){ echo $name echo "用户在线,将写消息给$name,输入CTRL+D为结束" echo `write $name` # echo -e\n # echo "welcom to this computer" # echo "eof" } #如果用户不在线 isNoAt(){ ec原创 2011-12-07 14:51:40 · 252 阅读 · 0 评论