id: f555c21d9c9d4df39f426c92e927c77c
parent_id: 
item_type: 1
item_id: c8f1fc8634de4b56be18bb0b8e10d916
item_updated_time: 1764345626503
title_diff: "[{\"diffs\":[[1,\"Linux grep指令\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":12}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>Linux grep指令</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"content-class\\\" content=\\\"yinxiang.peso.superNote\\\"/>\\\r\\\n  <meta name=\\\"application-data:yinxiang.noteLayout\\\" content=\\\"{\\\"lineSpace\\\":\\\"recommend\\\",\\\"paragraphSpace\\\":\\\"recommend\\\"}\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"39507\\\"></a>\\\r\\\n<h1>Linux grep指令</h1>\\\r\\\n\\\r\\\n<div><span style=\\\"margin:0px;\\\"><div style=\\\"padding:8px 0px;margin:8px auto;max-width:700px;\\\"> <div><span></span></div>\\\n<p></p>\\\n<div style=\\\"--en-blockquote:true;box-sizing: border-box; padding-left: 19px; padding-top: 6px; padding-bottom: 6px; border-left: 3px solid #b4c0cc; background-position: initial initial; background-repeat: initial initial; margin-top: 6px\\\"><div>原文链接: <a href=\\\"http://mp.weixin.qq.com/s?__biz=Mzg3MDQ4MjA2Mg==&amp;mid=2247484678&amp;idx=1&amp;sn=7b7e2e36601087a4bd39dc7f7d4e387d&amp;chksm=cf004dc33cf188d24494d17883cafecee341c4baf3e551adb448126da661e9c235c8a352e508&amp;mpshare=1&amp;scene=1&amp;srcid=04073TFD4vQLlPaZ2DAPdWDk&amp;sharer_shareinfo=d64ddc2c9a1c9ee90cdafa356f6c55bb&amp;sharer_shareinfo_first=d64ddc2c9a1c9ee90cdafa356f6c55bb#rd\\\"><span>http://mp.weixin.qq.com/s?__biz=Mzg3MDQ4MjA2Mg==&amp;mid=2247484...</span></a></div></div>\\\n<p></p>\\\n<div><span></span></div>\\\n<div style=\\\"\\\"><div><div><h1 style=\\\"margin:0\\\"> Linux grep指令 </h1><div><span style=\\\"position:relative\\\">原创</span><span> Halugin </span><span><a style=\\\"position:relative\\\"> Halugin </a></span><span><em></em></span></div><div style=\\\";\\\"><h1 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:24px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>Linux grep指令</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h1><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>1. grep核心概念与基础应用</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>1.1 工具定位与发展历史</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span>grep(Global Regular Expression Print)作为Unix/Linux系统中的文本搜索利器，由Ken Thompson于1974年在贝尔实验室开发。其名称来源于ed编辑器的命令“g/re/p”（global regular expression print），现已成为POSIX标准的核心工具之一。</span></p><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>1.2 基本语法结构</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span>标准语法格式：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep [OPTIONS] PATTERN [FILE...]</span><div><span>grep [OPTIONS] -e PATTERN ... [FILE...]  # 显示指定模式</span></div><div><span>grep [OPTIONS] -f FILE ... [FILE...]   # 从文件读取模式</span></div></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>1.3 常用基础选项速查</span></span></h3><table style=\\\"box-sizing: border-box;border-collapse: collapse;display: table;text-align: left;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>选项</span></div></th><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>功能描述</span></div></th></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-i</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>忽略大小写</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-v</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>反向匹配（排除模式）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-n</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>显示行号</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-c</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>统计匹配行数</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-l</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>仅显示包含匹配的文件名</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-L</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>显示不包含匹配的文件名</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-w</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>整词匹配</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-x</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>整行匹配</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-o</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>仅输出匹配内容</span></div></td></tr></tbody></table><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>1.4 基础应用实例</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例1：多文件搜索</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep 'error' /var/log/syslog /var/log/kern.log</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例2：递归目录搜索</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -r 'TODO' ~/projects/</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例3：统计日志错误次数</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -c 'Connection refused' /var/log/nginx/access.log</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例4：精确匹配整词</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -w 'bind' /etc/named.conf</span><div><span><br/></span></div></div></pre></div><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>2. 正则表达式解析</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>2.1 POSIX正则表达式分类</span></span></h3><ol style=\\\"margin:0;box-sizing:border-box;margin-top:8px;margin-bottom:8px;padding-left:25px;color:rgb(0,0,0);list-style-type:decimal;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-size:16px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>基本正则表达式（BRE）</span></strong></div></li><ul style=\\\"margin:0;box-sizing:border-box;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><span>默认模式，需转义扩展字符</span></div></li><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><span>支持：</span><code style=\\\"box-sizing: border-box;font-size: 14px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;\\\"><span>. * []^ $</span></code></div></li></ul><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>扩展正则表达式（ERE）</span></strong></div></li><ul style=\\\"margin:0;box-sizing:border-box;margin-top:8px;margin-bottom:8px;padding-left:25px;color:black;list-style-type:disc\\\"><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><span>使用</span><code style=\\\"box-sizing: border-box;font-size: 14px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;\\\"><span>-E</span></code><span>选项或</span><code style=\\\"box-sizing: border-box;font-size: 14px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;\\\"><span>egrep</span></code></div></li><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><span>新增：</span><code style=\\\"box-sizing: border-box;font-size: 14px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0px 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;\\\"><span>+ ? |() {}</span></code></div></li></ul></ol><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>2.2 特殊字符集详解</span></span></h3><table style=\\\"box-sizing: border-box;border-collapse: collapse;display: table;text-align: left;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>表达式</span></div></th><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>匹配内容</span></div></th></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>[[:alnum:]][[:</span><em style=\\\"box-sizing: border-box;font-style: italic;color: black;\\\"><span>a</span><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>l</span></strong><span>n</span><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>u</span></strong><span>m</span></em><span>:]]</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>字母数字字符</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>[[:space:]][[:</span><em style=\\\"box-sizing: border-box;font-style: italic;color: black;\\\"><span>s</span><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>p</span></strong><span>a**ce</span></em><span>:]]</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>空白字符（含制表符换行符）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>[[:xdigit:]][[:</span><em style=\\\"box-sizing: border-box;font-style: italic;color: black;\\\"><span>x</span><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>d</span></strong><span>i</span><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>g</span></strong><span>i**t</span></em><span>:]]</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>十六进制数字</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>[^A-Z]</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>非大写字母</span></div></td></tr></tbody></table><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>2.3 量词匹配模式</span></span></h3><table style=\\\"box-sizing: border-box;border-collapse: collapse;display: table;text-align: left;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>量词</span></div></th><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>BRE形式</span></div></th><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>ERE形式</span></div></th><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>匹配次数</span></div></th></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>零或多次</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>*</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>*</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>0~N</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>至少一次</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>{1,}</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>+</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>1~N</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>零或一次</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>?</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>?</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>0或1</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>精确次数</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>{n}</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>{n}</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>恰好n次</span></div></td></tr></tbody></table><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>2.4 高级正则示例</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例5：匹配合法IP地址</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -E '([0-9]{1,3}\\\\.){3}[0-9]{1,3}' access.log</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例6：提取HTML标签内容</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -oP '&lt;h1&gt;\\\\K.*?(?=&lt;/h1&gt;)' index.html</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例7：匹配复杂时间格式</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -E '([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]' timestamps.txt</span></div></pre></div><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>3. grep性能优化策略</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>3.1 预处理优化技巧</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>优化策略1：文件类型过滤</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -r --include='*.log' 'ERROR' /var/log/</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>优化策略2：排除目录</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -r --exclude-dir={cache,tmp} 'WARNING' /opt/app/</span></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>3.2 搜索模式优化</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>优化策略3：锚定搜索</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep '^2023-' access.log # 快速定位以日期开头的行</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>优化策略4：固定字符串加速</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -F '[DEBUG]' app.log # 禁用正则表达式</span></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>3.3 系统级优化</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>优化策略5：内存映射加速</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep --mmap 'critical' largefile.bin</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>优化策略6：并行处理</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>parallel --pipe grep 'pattern' ::: binfile.txt</span></div></pre></div><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>4. 上下文控制与输出格式化</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>4.1 上下文显示参数</span></span></h3><table style=\\\"box-sizing: border-box;border-collapse: collapse;display: table;text-align: left;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>参数组合</span></div></th><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>功能说明</span></div></th></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-A 3</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>显示匹配行后3行</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-B 2</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>显示匹配行前2行</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-C 5</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>显示匹配行前后各5行</span></div></td></tr></tbody></table><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>4.2 输出控制选项</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例8：颜色高亮显示</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep --color=auto 'WARNING' syslog</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例9：二进制文件处理</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -a -U 'search_string' binary.data</span></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>4.3 格式控制实例</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例10：CSV文件处理</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -oP '^[^,]*,\\\\K[^,]*' data.csv</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例11：JSON数据提取</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -oP '&quot;id&quot;:\\\\s*\\\\K\\\\d+' reponse.json</span></div></pre></div><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>5. 高级应用场景与技巧</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>5.1 多条件复合搜索</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>技巧1：与逻辑实现</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep 'error' syslog | grep 'network'</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>技巧2：或逻辑实现</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -E 'fatal|critical|panic' messages</span></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>5.2 版本控制集成</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例12： Git历史搜索</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>git grep -n 'deprecated_function' v2.3..v3.1</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例13：SVN日志分析</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>svn log | grep -B 3 'PROJ-1234'</span></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>5.3 系统监控应用</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例14：实时日志监控</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>tail -f /var/log/nginx/access.log | grep '500'</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例15：进程状态过滤</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>ps aux | grep -E '[a]pache|[n]ginx'</span></div></pre></div><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>6. 性能基准测试与对比</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>6.1 测试环境说明</span></span></h3><ul style=\\\"margin:0;box-sizing:border-box;margin-top:8px;margin-bottom:8px;padding-left:25px;color:rgb(0,0,0);list-style-type:disc;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-size:16px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><span>硬件：Xeon E5-2680v4</span></div></li><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><span>测试文件：8GB Apache日志文件</span></div></li><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><span>模式：匹配IPv4地址</span></div></li></ul><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>6.2 不同选项耗时对比</span></span></h3><table style=\\\"box-sizing: border-box;border-collapse: collapse;display: table;text-align: left;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>命令形式</span></div></th><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>耗时(s)</span></div></th></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>grep 'regex'</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>12.34</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>grep -E 'regex'</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>11.89</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>grep -F 'fixed'</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>4.56</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>grep --mmap 'regex'</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>9.87</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>ag 'regex'</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>3.21</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>rg 'regex'</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>1.45</span></div></td></tr></tbody></table><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>6.3 内存消耗对比</span></span></h3><table style=\\\"box-sizing: border-box;border-collapse: collapse;display: table;text-align: left;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>工具</span></div></th><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>峰值内存(MB)</span></div></th></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>grep</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>85</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>egrep</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>92</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>ack</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>120</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>ripgrep</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>45</span></div></td></tr></tbody></table><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>7 安全注意事项与最佳实践</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>7.1 安全使用规范</span></span></h3><ol style=\\\"margin:0;box-sizing:border-box;margin-top:8px;margin-bottom:8px;padding-left:25px;color:rgb(0,0,0);list-style-type:decimal;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-size:16px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>敏感信息处理</span></strong></div></li></ol><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -r --exclude='*.key' 'password' /etc/</span></div></pre></div><ol style=\\\"margin:0;box-sizing:border-box;margin-top:8px;margin-bottom:8px;padding-left:25px;color:rgb(0,0,0);list-style-type:decimal;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-size:16px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><li style=\\\"box-sizing: border-box;\\\"><div style=\\\"box-sizing: border-box;display: block;margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>输入验证原则</span></strong></div></li></ol><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>safe_pattern=$(printf '%q' &quot;$user_input&quot;)</span><div><span>grep &quot;$safe_pattern&quot; file.txt</span></div></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>7.2 错误处理技巧</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>案例1：处理特殊字符</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -F '[ERROR]' logfile  # 使用固定字符串模式</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>案例2：编码问题处理</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -a --binary-files=text '检索' unknown_encoding.txt</span></div></pre></div><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>8. 扩展工具链集成</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>8.1 与AWK协同工作</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例16：字段提取</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep 'HTTP/1.1&quot; 500' access.log | awk '{print $7}'  </span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例17：统计排序</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -oP 'user-\\\\K\\\\d+' access.log | sort | uniq -c | sort -nr</span></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>8.2 与sed结合使用</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例18：替换敏感信息</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep 'password' config.ini | sed 's/password: .*/password: *********/'</span></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>8.3 与find深度集成</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>示例19：复杂文件搜索</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>find /var/log -name '*.log' -mtime -7 -exec grep -H 'ERROR' {} +</span></div></pre></div><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>9. 常见问题解决方案</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>9.1 典型问题排查</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>问题1：二进制文件误报</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep -I 'search' *  # 跳过二进制文件</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>问题2：大文件内存溢出</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>grep --line-buffered 'pattern' hugefile.log</span></div></pre></div><h3 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:20px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>9.2 性能问题分析</span></span></h3><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>案例3：慢速搜索优化</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>LC_ALL=C grep 'fast_search' bigfile.txt # 禁用locale处理</span></div></pre></div><p style=\\\"box-sizing:border-box;margin:0;font-size:16px;padding-top:8px;padding-bottom:8px;line-height:26px;color:rgb(0,0,0);font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><strong style=\\\"box-sizing: border-box;font-weight: bold;color: black;\\\"><span>案例4：正则表达式回溯</span></strong></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span># 将.*替换为[^ ]*避免过度回溯</span><div><span>grep -E '[0-9]{3}-[0-9]{4}' contacts.txt</span></div></div></pre></div><h2 style=\\\"margin:0;box-sizing:border-box;margin-top:30px;margin-bottom:15px;color:rgb(0,0,0);font-weight:bold;font-size:22px;font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,&quot;PingFang SC&quot;,Cambria,Cochin,Georgia,Times,&quot;Times New Roman&quot;,serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:justify;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\\\"><span style=\\\"box-sizing: border-box;\\\"><span>附录：grep选项速查表</span></span><span style=\\\"box-sizing: border-box;\\\"></span></h2><table style=\\\"box-sizing: border-box;border-collapse: collapse;display: table;text-align: left;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>选项组合</span></div></th><th style=\\\"box-sizing: border-box;text-align: left;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;font-weight: bold;background-color: rgb(240, 240, 240);\\\"><div><span>功能描述</span></div></th></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-e PATTERN</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>显式指定匹配模式</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-f FILE</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>从文件读取模式列表</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>--exclude</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>排除指定文件模式</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>--include</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>包含指定文件模式</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-z</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>以NUL字符分隔记录</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-m NUM</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>最大匹配次数限制</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-b</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>显示字节偏移量</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-H</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>总是显示文件名</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-h</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>隐藏文件名显示</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-image: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\\\"><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>-q</span></div></td><td style=\\\"box-sizing: border-box;font-size: 16px;border: 1px solid rgb(204, 204, 204);padding: 5px 10px;text-align: left;\\\"><div><span>静默模式（仅返回状态码）</span></div></td></tr></tbody></table><div><span><br/></span></div></div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":129525}]"
metadata_diff: {"new":{"id":"c8f1fc8634de4b56be18bb0b8e10d916","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348821242,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:03:43.637Z
created_time: 2025-11-28T21:03:43.637Z
type_: 13