grep -Ec '.*404.*baidu.*' nowcoder.txt
  • grep 命令中 `-E` 指定使用扩展的正则表达式
  • grep 命令中 `-c` 表示获取匹配的行数