标签:style blog color os for 2014 ar div
squid节点添加新域名 测试是否缓存成功
1 #!/bin/bash
2 #2014-8-1
3
4 clear #清屏 方便输出结果观看
5
6 url=* #需要测试的url
7
8 array_node[0]="*" #节点ip做成一个关联数组
9 array_node[1]="*"
10 array_node[2]="*"
11 array_node[3]="*"
12 array_node[4]="*"
13 array_node[5]="*"
14 array_node[6]="*"
15 array_node[7]="*"
16 array_node[8]="*"
17 array_node[9]="*"
18 array_node[10]="*"
19 array_node[11]="*"
20 array_node[12]="*"
21 array_node[13]="*"
22 array_node[14]="*"
23 array_node[15]="*"
24 array_node[16]="*"
25 array_node[17]="*"
26
27 for i in ${array_node[*]}
28 do
29 printf "$((++n)): %s\n" "$(curl -s -I -H "Host:$url" $i | grep X-Cache | cut -c 10-)" # curl -I 只输出头部信息 -H 指定主机 -s 安静模式输出 没有-s 管道后会有类型进度条信息的输出 很乱
30 done
1 输出结果 2 3 1: MISS from * 4 2: MISS from * 5 3: MISS from * 6 4: MISS from * 7 5: MISS from * 8 6: MISS from * 9 7: MISS from * 10 8: MISS from * 11 9: MISS from * 12 10: MISS from * 13 11: MISS from * 14 12: MISS from * 15 13: MISS from * 16 14: MISS from * 17 15: MISS from * 18 16: MISS from * 19 17: MISS from * 20 18: MISS from *
标签:style blog color os for 2014 ar div
原文地址:http://www.cnblogs.com/metasequoia/p/3884918.html