- 论坛徽章:
- 780
|
本帖最后由 Herowinter 于 2014-07-25 16:37 编辑
回复 13# sulaimani_yu
希望这个是你想要的,我5点半下班回家了,
真有问题估计要下周才能改了。- awk -vt1="50008881" -vt2="50008898" 'BEGIN{RS="\\^\\^";ORS="";team[t1];team[t2]} {count=gensub(/.*user_count[^=]*=[\^@]*([0-9]+).*/,"\\1",1);if(count!=$0&&count!=0){tid=gensub(/.*team@[^=]*=([0-9]+).*/,"\\1",1);if(tid in team)print}}' i
- ROWKEY=14:10000012955^_
- count:user_count@1398766330048=^@^@^@^@^@^@^@3^_
- count:user_num@1398168030155=0^_
- info:team@1398168029628=50008881^_
- ROWKEY=14:10000012955^_
- count:user_count@1398766330048=^@^@^@^@^@^@^@13^_
- count:user_num@1398168030155=0^_
- info:team@1398168029628=50008898^_
复制代码- cat i
- count:user_count@1405330702789=^@^@^@^@^@^@^@^@^_
- count:user_num@1405123296208=0^_
- info:team@1405123296982=50000671^_
- ^^
- count:user_count@1400000166287=^@^@^@^@^@^@^@^A^_
- count:user_num@1382241122888=0^_
- info:team@1383533112230=50008898^_
- ^^
- count:user_count@1396901933090=^@^@^@^@^@^@^@^B^_
- count:user_num@1396901933433=0^_
- info:team@1396901933270=50021422^_
- ^^
- ROWKEY=14:10000012955^_
- count:user_count@1398766330048=^@^@^@^@^@^@^@3^_
- count:user_num@1398168030155=0^_
- info:team@1398168029628=50008881^_
- ^^
- ROWKEY=14:10000011267^_
- count:user_num@1396901933433=0^_
- info:team@1396901933270=50021422^_
- ^^
- ROWKEY=14:10000012955^_
- count:user_count@1398766330048=^@^@^@^@^@^@^@13^_
- count:user_num@1398168030155=0^_
- info:team@1398168029628=50008898^_
复制代码 |
|