zoukankan      html  css  js  c++  java
  • perl 处理文本

    redis01:/root# cat abc
    GET /api/sale/get_voucher_list?loupan_id=32300&suid=kJIjl&loupan_site=sc&code=d30d52a87c0ba4e342c9315d44845be5&source=pc HTTP/1.1
    GET /api/sale/get_voucher_list?loupan_id=108578&loupan_site=huizhou&code=26f3cdc956828768a54c334eb76770f5&source=pc HTTP/1.1
    GET /api/sale/get_voucher_list?loupan_id=107499&loupan_site=dg&code=e22b6dd312cd2921adc0788578345615&source=pc HTTP/1.1
    GET /api/sale/get_voucher_list?loupan_id=103399&loupan_site=nb&code=ccc411746f3505ea8fe5ecef6b2657ce&source=pc HTTP/1.1
    POST /api/sale/get_voucher_list?loupan_id=103399&loupan_site=nb&code=ccc411746f3505ea8fe5ecef6b2657ce&source=pc HTTP/1.1
    GET /index.php/Site/Index/room_id/1206?wt_source=newshp_twzb_05 HTTP/1.1
    GET /rss/detail/jinri/6154165177643499905.html?source=jrtt HTTP/1.1
    GET /rss/detail/jinri/6153808754283709277.html?source=jrtt HTTP/1.1
    GET /rss/detail/jinri/6154162659391767265.html?source=jrtt HTTP/1.1
    GET /sso/cookies.php?callback=_1467350571428134&uid=140812417 HTTP/1.1
    GET /sso/cookies.php?callback=_1467350571421134&uid=140812117 HTTP/1.1
    GET /sso/cookies.php?callback=_14673505734551134&uid=141234522117 HTTP/1.1
    GET /sso/cookies.php?callback=_146711135411428134&uid=14112322117 HTTP/1.1
    GET /index.php/Site/Index/room_id/1116?wt_source=newshp_twzb_05&max=123 HTTP/1.1
    GET /index.php/Site/Index/room_id/1356?wt_source=newshp_twzb_03 HTTP/1.1
    redis01:/root# perl a1.pl 
    GET /rss/detail/jinri/6154162659391767265.html?source=jrtt HTTP/1.1
    GET /index.php/Site/Index/room_id/1356?wt_source=newshp_twzb_03 HTTP/1.1
    GET /index.php/Site/Index/room_id/1206?wt_source=newshp_twzb_05 HTTP/1.1
    GET /rss/detail/jinri/6154165177643499905.html?source=jrtt HTTP/1.1
    POST /api/sale/get_voucher_list?loupan_id=103399&loupan_site=nb&code=ccc411746f3505ea8fe5ecef6b2657ce&source=pc HTTP/1.1
    GET /rss/detail/jinri/6153808754283709277.html?source=jrtt HTTP/1.1
    GET /sso/cookies.php?callback=_146711135411428134&uid=14112322117 HTTP/1.1
    GET /index.php/Site/Index/room_id/1116?wt_source=newshp_twzb_05&max=123 HTTP/1.1
    redis01:/root# cat a1.pl 
              open (LOG ,"<","abc");  
                  while (<LOG>) {  
                            chomp; 
                            if ($_ =~ /s*(POST|GET)s+(.*?)?.*/){
                            $hash{$2}=$_;
                            };
                          }; 
            while(my($a, $b) = each %hash) 
                   {
                     print $b."
    ";
                     };

  • 相关阅读:
    Spring 注解大全
    sql相关
    深入理解Java虚拟机 自己编译JDK
    MarkDown语法 学习笔记 效果源码对照
    学习
    【转】Java方向如何准备BAT技术面试答案(汇总版)
    Java (PO,VO,DAO,BO,POJO,DTO) 几种对象解释
    Python实现脚本锁功能,同时只能执行一个脚本
    java 内存管理 —— 《Hotspot内存管理白皮书》
    vue子组件实时获取父组件传来的值
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350526.html
Copyright © 2011-2022 走看看