• 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."
    ";
                     };

  • 相关阅读:
    ant脚本打jar包 自动获取时间以及项目svn版本号
    15分钟学会git基本的操作命令
    java后端模拟表单提交
    优秀js插件收藏
    javascript操作
    javascript常用方法整理--数组篇
    javascript exec方法
    javascript 拷贝
    自执行函数简单应用
    jsonp跨域原理解析
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350526.html
Copyright © 2020-2023  润新知