shell脚本从SVN推送到多台服务器的代码
SRCDIR=/letv/data/www/htdocs_user/
MOD=user
IP_LIST=(192.126.32.92 192.126.32.93 192.181.155.160 192.181.155.214 192.181.155.215 192.126.32.171)for i in ${IP_LIST[*]}
do
echo -e "nnPUSH == $i == n"
/usr/bin/rsync -vzrtopg --progress --delete-after $SRCDIR --exclude=".svn" rsync://$i/$MOD/
done
不是很明白,以后留着慢慢用!!!
检测网站down掉后自动发信的shell脚本代码
#!/bin/bash#websitetestscriptswhiletrue;doforcycle_tempin`caturl_list`doiflynx-dump`echo${cycle_temp}`-accept_all_cookies|grep"true";thenecho"Thewebsiteisrunningnaturally"elseecho"${cycle_temp}hasbeen
提取oralce当天的alert log的shell脚本代码
提取oralce当天的alertlog的shell脚本#/bin/sh#getalertofeveryday#thennameoffileiseveryday_alert.shdir="/oracle/admin/bbdz/bdump"num=$(cat-n${dir}/alert_bbdz.log|grep"`date|cut-c1-10`"|head-n1|aw
统计网卡流量的两段shell脚本(使用ifconfig)
使用shell脚本计算Linux网卡流量,方法中最关键点:ifconfig$eth_name|grepbytes|awk'{print$6}'|awk-F:'{print$2}'通过ifconfigeth0|grepbytes得到输入输出的流量。/@rac2=dd2$ifco