Daily Script8

2022-07-09 23:41:29 浏览数 (3)

[for]

代码语言:javascript复制
for i in `cat u`;do ng_find $i >>u.path 2>>u.log; done
for i in `cat u.path`; do sed -i 's=soft.com.soft.com.log=soft.com.log=' $i; done
for i in `cat u.path` ; do  sed -i -r -e 's=/log/zdr/(ndc-w -w ).soft.com.log=/log/zdr/1.log=' -e 's=/log/(ndc-w -w ).soft.com.log=/log/1.log=' $i; done 
for i in `cat u.address2`; do nexec -i -l $i ln -s /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so.0.9.8; nexec -i -l $i ln -s /usr/local/ssl/lib/libcrypto.so.0.9.8  /usr/lib/libcrypto.so.0.9.8; done
(for i in `cat u.path`;do sed -i -r -e "s=(-ps '/opt/(w )/S )=1 -u 2=" $i;done) >u.log 2>u.log2
(for i in `cat u`;do nexec -i -l $i ln -s /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so.0.9.8; nexec -i -l $i ln -s /usr/local/ssl/lib/libcrypto.so.0.9.8  /usr/lib/libcrypto.so.0.9.8; done) 1>&8 2>&9
for i in `cat time_s`; do date -d "1970-01-01 UTC $i seconds"  "%x %X%z %Z" ; done;
for i in `cat o2`; do ng_disable_check -H $i -y -q -a wfang01 -c troubleshooting ; done
for i in `cat u.path`; do  sed -i -r -f p $i; done

[sed]

代码语言:javascript复制
sed -n '/03:00:52/,$p' messages
sed -ri -e 's/(contactss w )/1,sganes/' -e 's/sganes,sganes/sganes/' {n,e}dc-emsimg-app{1..4}.cfg
sed -ri -e 's/nobody/sganes/' -e  's/(contactss w )/1,sganes/' -e 's/sganes,sganes/sganes/' {n,e}dc-emsts-app{1..4}.cfg
sed -i 's=soft.com.soft.com.log=soft.com.log=' ndc-v5-dalprs3.cfg 
sed  -ri -e 's=/log/zdr/(ndc-w -w ).soft.com.log=/log/zdr/1.log=' -e 's=/log/(ndc-w -w ).soft.com.log=/log/1.log=' ndc-v5-l2cacheprs8.cfg
sed -r -e "s=(-ps '/opt/(w )/S )=1 -u 2=" test2
sed -ri -e "s=(-ps '/opt/(w -w )/S )=1 -u 2=" /Monitoring/nagios/etc/objects/VIP/ndc-vwmriskp1.cfg
sed -r 's=(.*?([en]dc[-1-9a-z] ).*?open log file (/S ):.*?)=2t3=' test|sort -u > u
sed -r "s=with ip (S ),=#1#=" error |cut -f 2 -d '#' |sort -rn |uniq
sed -r -e "s=(S*CORES*)=#1#="  -e "s=(S*SQLS*)=#1#=" error.firewall  |cut -f 2,4 -d '#' |sort -rn | grep CORE |uniq > error.useful
sed -r 's=(to|for|for DataSource)s (S [._]S )=1 #2#=g'  ui  | grep '#'|cut -f 2 -d '#'| sort -u
sed -e 's!^!http://tmr-master.vip.fucktest.com/cgi-bin/epstatus.cgi?submitted=yes&input=ep&name=!' -e 's!$!&quest=epsync&swd_package=!' b 
s=(check_remote!check_http!-as "-Hs [ne]dc[-0-9a-z] s -us )S s (.*)=1'/verify.jsp' -p 1730 2=

grep  'beijing' test  | sed 's/.ecop.beijing.fucktest.com//'| sed 's/^/add server /'
grep  'beijing' test  | sed 's/.ecop.beijing.fucktest.com//'|  sed -r 's/(.*)/add service test_1-9000 1 HTTP 9000 -gslb NONE -maxClient 0 -maxReq 0 -cip ENABLED X-fucktest-Web-Tier-IP -usip NO -useproxyport YES -sp OFF -cltTimeout 180 -svrTimeout 360 -CKA NO -TCPB YES -CMP NO -state DISABLED -downStateFlush DISABLED -appflowLog DISABLED/'
grep  'beijing' test  | sed 's/.ecop.beijing.fucktest.com//'| cut -f 1  | sed -r 's/(.*)/add service test_1-9000 1 HTTP 9000 -gslb NONE -maxClient 0 -maxReq 0 -cip ENABLED X-fucktest-Web-Tier-IP -usip NO -useproxyport YES -sp OFF -cltTimeout 180 -svrTimeout 360 -CKA NO -TCPB YES -CMP NO -state DISABLED -downStateFlush DISABLED -appflowLog DISABLED/'
grep  'beijing' test  | sed 's/.ecop.beijing.fucktest.com//'| cut -f 1  | sed -r 's/(.*)/add service test_1-9000 1 HTTP 9000 -gslb NONE -maxClient 0 -maxReq 0 -cip ENABLED X-fucktest-Web-Tier-IP -usip NO -useproxyport YES -sp OFF -cltTimeout 180 -svrTimeout 360 -CKA NO -TCPB YES -CMP NO -state DISABLED -downStateFlush DISABLED -appflowLog DISABLED/'
grep  'beijing' test  | sed 's/.ecop.beijing.fucktest.com//'| cut -f 1  | sed -r 's/(.*)/bind lb monitor v3app_ecv  test_1-9000/'
 ../find-unused-ip.sh  10.91.121.0/24
grep  'beijing' test  | sed 's/.ecop.beijing.fucktest.com//'| cut -f 1  | sed -r 's/(.*)/bind lb monitor v3app_ecv  test_1-9000/'
grep  'beijing' test  | sed 's/.ecop.beijing.fucktest.com//'| cut -f 1  | sed -r 's/(.*)/bind lb vserver test-app-1-9000  test_1-9000/'
grep  -v 'beijing' test  | sed 's/.ecop.hangzhou.fucktest.com//'| cut -f 1  | sed -r 's/(.*)/bind lb vserver test-app-1-9000  test_1-9000/'

sed -r "s=with ip (S ),=#1#=" orphan |cut -f 2 -d '#' |sort -rn |uniq 
sed -n '331,360p' or2 > 360
sed -n '361,$p' or2 > 381
cat jk| sed '/com$/{
N
s/comnFunction/comtFunction/
}'

[awk]

代码语言:javascript复制
ps faux   | grep "sshd" | grep -v 'grep' | awk 'BEGIN{sum=0;}{sum=sum $6;}END{print sum*1024;}'
ps faux  | awk 'BEGIN{sum=0}{sum=sum $6}END{print sum/1024}'

[jekyll]

代码语言:javascript复制
jekyll server  --host 0.0.0.0 --port 8080

原文地址

0 人点赞