Shell脚本
奋飞的蜗牛
亦余心之所向兮,虽九死其犹未悔矣。
展开
-
expect脚本
#!/usr/bin/expect set timeout 30 spawn ssh原创 2014-09-11 16:36:34 · 299 阅读 · 0 评论 -
一个在多台服务器上查询日志量的脚本
#!/bin/sh file=$1 start=$2 end=$3 while [ "$start" -le "$end" ] ; do pssh -h $file -t -4 -p 10 -i "cat /home/log/$start/a.log" > text.txt start=$[$start+1] done echo cal: ; cat text.txt | grep -c cal原创 2014-08-20 15:14:26 · 1230 阅读 · 0 评论