- 论坛徽章:
- 24
|
- [root@module myredis]# cat aa.log
- gc:TestA_GC
- Rep set:RSet42,RSet43,RSet44,RSet45
- VLX group name:Test_GC_Local
- [root@module myredis]# awk -F '[:|:]+' '$1=="gc"{gc=$2}$1~"Rep set"{gsub(",","\n"gc" ",$2);rset=$2;print gc,$2}' aa.log
- TestA_GC RSet42
- TestA_GC RSet43
- TestA_GC RSet44
- TestA_GC RSet45
- [root@module myredis]# awk -F '[:|:]+' '$1=="gc"{gc=$2}$1~"Rep set"{rset=$2}$1~"VLX group name"{vlx=$2}END{gsub(","," "vlx"\n"gc" ",rset);print gc,rset,vlx}' aa.log
- TestA_GC RSet42 Test_GC_Local
- TestA_GC RSet43 Test_GC_Local
- TestA_GC RSet44 Test_GC_Local
- TestA_GC RSet45 Test_GC_Local
复制代码 |
|