【cdnノード状態簡易表示】cdn_lookup.sh
【cdnノード状態簡易表示】cdn_lookup.sh
#!/bin/bash
#
# 2015/6/18
# cdn ip, status code, header 。
action=$1
[ -z $2 ] && hostname="my.workec.com" || hostname=$2
function usage() {
cat <<_eof usage:="" _eof="" function="">hh.log 2>&1
cat hh.log |grep -B3 -A11 '200 OK' |diff hh.log - |sed -e '1,4d' -e 's/-//g' -e 's/^[>vv.log 2>&1
cat vv.log |grep -B10 -A16 '200 OK' |diff vv.log - |sed -e '1d' -e 's/-//g' -e 's/^[>${ip}.log 2>&1
sed -i -e 's/* About to/
+-----------------------------------------------------------------------------------+
\0/g' \
-e 's/