我一直在走,至少还有条路,也好于无路可走…
发布时间:2012-12-27 10:42:19
#!/bin/bash#rename.sh#用途:重命名jpg png 文件count 1;for img in *.jph *.pngdonew=image-$count.${img##*.}mv "$img" "$new" 2>/dev/nullif [ $? -eq 0 ];then echo "renameing $img to $new" let count++fidon......【阅读全文】
发布时间:2012-12-26 12:32:08
1 #!/bin/bash 2 #userdel 3 echo "please input user:" 4 read name 5 echo "please input mumber:" 6 read num 7 m=0 8 while [ $m -lt $num ] 9 do 10 m=`expr $m + 1` 11 userdel -r $name$m >/dev/null 12 done 13 ......【阅读全文】
发布时间:2012-12-26 12:24:00
1 #!/bin/bash2 #用途:3查看本地用户shell 4 line=`cat /etc/passwd|grep $1` 5 if [ $? -eq 0 ];then 6 echo user:$1 7 else 8 echo "Not user " 9 exit 0 10 fi 11 oldIFS=$IFS; 12 IFS=":" 13 count=0 14 for item in $line; 15 do 16 [ $count -eq 0 ] && user=$item; 17 [ $count -eq 6 ] && shell=$ite......【阅读全文】
发布时间:2012-12-24 09:53:01
#!/bin/bash #useradd and password echo "please input username:" read name echo "please input number:" read num n=1 while [ $n -le $num ] do useradd $name$n n=`expr $n + 1 `&......【阅读全文】
发布时间:2012-12-12 13:56:15
#!/bin/bash echo 'tdjm v1.0 client by linuxhost'echo '###########################################'echo ''clearSOFTWARE_PATH=$(cd ~;pwd)NAGIOS_PATH=/usr/local/nagiosPACKAGE1=gccPACHAGE2=glibcPACKAGE3=xinetdPACKAGE4=opensslNAGIOS_SERVER=192.168.10.163 #插件位于nagios服务端的ftp上. /etc......【阅读全文】