• Linux环境下,请用一条命令计算出request.log文件中所有包含“requestDate”但是不包含“error”的行数【杭州多测师】【杭州多测师_王sir】


    root@ubuntu:/duoceshi# grep  "requestDate" *.log|grep -v "error" *.log
    requestDate
    requestDate
    requestDate
    hello
    root@ubuntu:/duoceshi# grep  "requestDate" *.log|grep -v "error" *.log|wc -l
    4
    root@ubuntu:/duoceshi# grep "requestDate" *.log|grep -v "error" *.log|wc -l
    4
    root@ubuntu:/duoceshi# 
    root@ubuntu:/duoceshi# 
    root@ubuntu:/duoceshi# ll
    total 17044
    drwxr-xr-x  3 root    root        4096 Sep 26 01:00 ./
    drwxr-xr-x 25 root    root        4096 Sep 23 20:18 ../
    drwxr-xr-x 17 xiaoshu xiaoshu     4096 Sep 23 20:19 Python-2.7.16/
    -rw-r--r--  1 root    root    17431748 Mar  2  2019 Python-2.7.16.tgz
    -rw-r--r--  1 root    root         111 Sep 26 00:59 request.log
    root@ubuntu:/duoceshi# 
    root@ubuntu:/duoceshi# cat request.log 
    requestDate hello error
    requestDate
    requestDate
    requestDate
    requestDaterequestDateerror
    errorrequestDate
    hello
  • 相关阅读:
    个人冲刺二(2)
    个人冲刺二(1)
    三个和尚观后感
    每日总结
    个人冲刺(10)
    个人冲刺(9)
    个人冲刺(8)
    个人冲刺(7)
    个人冲刺(6)
    下次视频面试前把电脑摄像头擦干净吧
  • 原文地址:https://www.cnblogs.com/xiaoshubass/p/15338642.html
Copyright © 2020-2023  润新知