id: 2c82dcbbaa5b41ba9e182a0ab519d201
parent_id: 
item_type: 1
item_id: 6138c4cec31f4eaa8e1943930bc02484
item_updated_time: 1764345626551
title_diff: "[{\"diffs\":[[1,\"shell笔记\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":7}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>shell笔记</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=\\\"39532\\\"></a>\\\r\\\n<h1>shell笔记</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=MzIzMTc2MzU0MA==&amp;mid=2247483953&amp;idx=1&amp;sn=ed851df3eada54107995045bf79f0f60&amp;chksm=e945038306b9e48005d0edae144b907048d29f380368a29005f9307bff8e1e34067fd1018c05&amp;mpshare=1&amp;scene=1&amp;srcid=0408bFqLnQn0vVMS7Nv7zJe8&amp;sharer_shareinfo=6ca69d5d2515f669ed2e9d1866e9ff47&amp;sharer_shareinfo_first=6ca69d5d2515f669ed2e9d1866e9ff47#rd\\\"><span>http://mp.weixin.qq.com/s?__biz=MzIzMTc2MzU0MA==&amp;mid=2247483...</span></a></div></div>\\\n<p></p>\\\n<div><span></span></div>\\\n<div style=\\\"\\\"><div><div><h1 style=\\\"margin:0\\\"> shell笔记 </h1><div><span style=\\\"position:relative\\\">原创</span><span><span style=\\\"position:relative\\\">qbxing</span></span><span><a style=\\\"position:relative\\\"> qbxing </a></span><span><em></em></span></div><div style=\\\";\\\"><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;margin:0;color:rgb(10,10,10);font-family:system-ui,&quot;PingFang SC&quot;,&quot;Helvetica Neue&quot;,&quot;Microsoft Yahei&quot;,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0;text-transform:none;white-space:normal;widows:2;word-spacing:0;-webkit-text-stroke-width:0;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;font-size:0;line-height:0\\\"><span> </span></p><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;font-size:16.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;display:table;padding:0 0.2em;color:rgb(255,255,255);background:rgb(15,76,129)\\\"><span>变量</span></h2><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>1. 自定义变量</span></h3><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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><span><br/></span><span>（1）定义变量：变量名=变量值，注意，=号前后不能有空格 </span><span><br/></span><span>（2）撤销变量：unset 变量名</span><span><br/></span><span>（3）声明静态变量：readonly 变量，注意：不能 unset</span><span><br/></span><span>-------------------------------</span><span><br/></span><span>A=5</span><span><br/></span><span>unset A</span><span><br/></span><span>readonly B=2</span><span><br/></span><span>export B    // 把变量提升为全局环境变量，可供其他 Shell 程序使用</span><span><br/></span><span>D=&quot;I love banzhang&quot;</span></div></pre><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>2. 特殊变量</span></h3><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;list-style:none;margin:0;padding:0 0 0 1em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:14px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. $n</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>$n （功能描述：n 为数字，$0 代表该脚本名称，$1-$9 代表第一到第九个参数，</span><span><br/></span><span>    十以上的参数需要用大括号包含，如${10}）</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. $#</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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><span><br/></span><span>    加强脚本的健壮性）</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>3. $*</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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><span><br/></span><span>$@ （功能描述：这个变量也代表命令行中所有的参数，不过$@把每个参数区分对待）</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>4. $？</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>$？ （功能描述：最后一次执行的命令的返回状态。如果这个变量的值为 0，证明上一 </span><span><br/></span><span>      个命令正确执行；如果这个变量的值为非 0（具体是哪个数，由命令自己来决定），</span><span><br/></span><span>      则证明上一个命令执行不正确了。）</span></div></pre></div></li></ol><div><span><br/></span></div><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;font-size:16.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0 0.2em;color:rgb(255,255,255);background:rgb(15,76,129)\\\"><span>运算符</span></h2><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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><span><br/></span><span>------------------</span><span><br/></span><span>S=$[(2+3)*4]</span></div></pre><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;font-size:16.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0 0.2em;color:rgb(255,255,255);background:rgb(15,76,129)\\\"><span>条件判断</span></h2><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;list-style:none;margin:0;padding:0 0 0 1em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:14px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. 基本语法</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>（1）test condition </span><span><br/></span><span>（2）[ condition ]（注意 condition 前后要有空格） </span><span><br/></span><span>注意：条件非空即为 true，[ atguigu ]返回 true，[ ] 返回 false。</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. 常用判断条件</span></div></li><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;list-style:none;margin:0;padding:0 0 0 1em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:14px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. 两个整数之间比较</span><div style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;padding: 0px 8px;max-width: 100%;overflow: auto;\\\"><table style=\\\"box-sizing:border-box;border-width:0px;border-style:solid;border-color:inherit;transition:all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;text-indent:0px;border-collapse:collapse;border-spacing:0px;min-width:207px;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>参数</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>说明</span></div></td></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-eq</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>等于（equal）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-ne</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>不等于（not equal）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-lt</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>小于（less than）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-le</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>小于等于（less equal）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-gt</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>大于（greater than）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-ge</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>大于等于（greater equal）</span></div></td></tr></tbody></table></div><span>注：如果是字符串之间的比较 ，用等号“=”判断相等；用“!=”判断不等。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. 字符串判断</span><div style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;padding: 0px 8px;max-width: 100%;overflow: auto;\\\"><table style=\\\"box-sizing:border-box;border-width:0px;border-style:solid;border-color:inherit;transition:all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;text-indent:0px;border-collapse:collapse;border-spacing:0px;min-width:211px;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>参数</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>说明</span></div></td></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-n</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>判断字符串长度是否非0</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-z</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>判断字符串长度是否为0</span></div></td></tr></tbody></table></div></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>3. 按照文件权限进行判断</span><div style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;padding: 0px 8px;max-width: 100%;overflow: auto;\\\"><table style=\\\"box-sizing:border-box;border-width:0px;border-style:solid;border-color:inherit;transition:all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;text-indent:0px;border-collapse:collapse;border-spacing:0px;min-width:191px;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>参数</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>说明</span></div></td></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-r</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>有读的权限（read）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-w</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>有写的权限（write）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-x</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>有执行的权限（execute）</span></div></td></tr></tbody></table></div></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>4. 按照文件类型进行判断</span><div style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;padding: 0px 8px;max-width: 100%;overflow: auto;\\\"><table style=\\\"box-sizing:border-box;border-width:0px;border-style:solid;border-color:inherit;transition:all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;text-indent:0px;border-collapse:collapse;border-spacing:0px;min-width:184px;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>参数</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>说明</span></div></td></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-e</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>文件存在（existence）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-f</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>文件存在并且是一个常规的文件（file）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-d</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>文件存在并且是一个目录（directory）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-s</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>判断file是否存在并非空</span></div></td></tr></tbody></table></div></div></li></ol><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>3. 案例实操</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>（1）23 是否大于等于 22</span><span><br/></span><span>  [ 23 -ge 22 ]; echo $?</span><span><br/></span><span>（2）helloworld.sh 是否具有写权限</span><span><br/></span><span>  [ -w helloworld.sh ]</span><span><br/></span><span>（3）目录中的文件是否存在</span><span><br/></span><span>  [ -e /home/xing/cls.txt ]</span><span><br/></span><span>（4）多条件判断（&amp;&amp; 表示前一条命令执行成功时，才执行后一条命令，|| 表示上一 条命令执行失败后，才执行下一条命令）</span><span><br/></span><span>  [ xing ] &amp;&amp; echo OK || echo notOK</span><span><br/></span><span>  [ ] &amp;&amp; echo OK || echo notOK</span></div></pre></div></li></ol><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;font-size:16.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0 0.2em;color:rgb(255,255,255);background:rgb(15,76,129)\\\"><span>流程控制</span></h2><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>1. if判断</span></h3><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>if [ 条件判断式 ] </span><span><br/></span><span>then</span><span><br/></span><span>    程序 </span><span><br/></span><span>elif [ 条件判断式 ] </span><span><br/></span><span>then</span><span><br/></span><span>    程序 </span><span><br/></span><span>else</span><span><br/></span><span>    程序 </span><span><br/></span><span>fi</span><span><br/></span><span>----------------------------------</span><span><br/></span><span>① [ 条件判断式 ]，中括号和条件判断式之间必须有空格 </span><span><br/></span><span>② if 后要有空格</span><span><br/></span><span>----------------------------------</span><span><br/></span><span>if [ $1 -eq 1 ] </span><span><br/></span><span>then </span><span><br/></span><span>    echo &quot;xing&quot; </span><span><br/></span><span>elif [ $1 -eq 2 ] </span><span><br/></span><span>then </span><span><br/></span><span>    echo &quot;ming&quot; </span><span><br/></span><span>fi</span></div></pre><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>2. case语句</span></h3><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>case $变量名 in </span><span><br/></span><span>&quot;值 1&quot;）</span><span><br/></span><span>    如果变量的值等于值 1，则执行程序 1 </span><span><br/></span><span>;;</span><span><br/></span><span>&quot;值 2&quot;）</span><span><br/></span><span>    如果变量的值等于值 2，则执行程序 2 </span><span><br/></span><span>;; </span><span><br/></span><span>    …省略其他分支… </span><span><br/></span><span>*） </span><span><br/></span><span>    如果变量的值都不是以上的值，则执行此程序 </span><span><br/></span><span>;;</span><span><br/></span><span>esac</span><span><br/></span><span>-----------------------------------------</span><span><br/></span><span>（1）case 行尾必须为单词“in”，每一个模式匹配必须以右括号“）”结束。 </span><span><br/></span><span>（2）双分号“;;”表示命令序列结束，相当于 java 中的 break。 </span><span><br/></span><span>（3）最后的“*）”表示默认模式，相当于 java 中的 default。</span><span><br/></span><span>-----------------------------------------</span><span><br/></span><span>case $1 in </span><span><br/></span><span>&quot;1&quot;) </span><span><br/></span><span>    echo &quot;xing&quot; </span><span><br/></span><span>;;</span><span><br/></span><span>&quot;2&quot;) </span><span><br/></span><span>    echo &quot;ming&quot; </span><span><br/></span><span>;;</span><span><br/></span><span>*)</span><span><br/></span><span>    echo &quot;wang&quot; </span><span><br/></span><span>;;</span><span><br/></span><span>esac</span></div></pre><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>3. for循环</span></h3><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;list-style:none;margin:0;padding:0 0 0 1em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:14px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. 语法1</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>for (( 初始值;循环控制条件;变量变化 )) </span><span><br/></span><span>do </span><span><br/></span><span>    程序 </span><span><br/></span><span>done</span><span><br/></span><span>--------------------------------------</span><span><br/></span><span>sum=0 </span><span><br/></span><span>for((i=0;i&lt;=100;i++)) </span><span><br/></span><span>do </span><span><br/></span><span>    sum=$[$sum+$i] </span><span><br/></span><span>done </span><span><br/></span><span>echo $sum</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. 语法2</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>for 变量 in 值1 值2 值3… </span><span><br/></span><span>do </span><span><br/></span><span>    程序 </span><span><br/></span><span>done</span><span><br/></span><span>--------------------------------------</span><span><br/></span><span>for i in xing ming hong </span><span><br/></span><span>do </span><span><br/></span><span>    echo &quot;he is $i&quot; </span><span><br/></span><span>done</span></div></pre></div></li></ol><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>4. while 循环</span></h3><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>while [ 条件判断式 ] </span><span><br/></span><span>do </span><span><br/></span><span>    程序 </span><span><br/></span><span>done</span><span><br/></span><span>-------------------------------------</span><span><br/></span><span>sum=0 </span><span><br/></span><span>i=1 </span><span><br/></span><span>while [ $i -le 100 ] </span><span><br/></span><span>do </span><span><br/></span><span>    sum=$[$sum+$i] </span><span><br/></span><span>    i=$[$i+1] </span><span><br/></span><span>done </span><span><br/></span><span>echo $sum</span></div></pre><div><span><br/></span></div><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;font-size:16.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0 0.2em;color:rgb(255,255,255);background:rgb(15,76,129)\\\"><span>read 读取控制台输入</span></h2><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>read (选项) (参数) </span><span><br/></span><span>①选项：</span><span><br/></span><span>    -p：指定读取值时的提示符； </span><span><br/></span><span>    -t：指定读取值时等待的时间（秒）如果-t 不加表示一直等待 </span><span><br/></span><span>②参数</span><span><br/></span><span>    变量：指定读取值的变量名</span><span><br/></span><span>————————————————————————————————————————————————</span><span><br/></span><span>// 提示 7 秒内，读取控制台输入的名称</span><span><br/></span><span>read -t 7 -p &quot;Enter your name in 7 seconds :&quot; NN </span><span><br/></span><span>echo $NN</span></div></pre><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;font-size:16.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0 0.2em;color:rgb(255,255,255);background:rgb(15,76,129)\\\"><span>函数</span></h2><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>1. 系统函数</span></h3><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;list-style:none;margin:0;padding:0 0 0 1em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:14px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. basename</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>basename [string / pathname] [suffix] </span><span><br/></span><span>（功能描述：basename 命令会删掉所有的前 缀包括最后一个（‘/’）字符，然后将字符串显示出来。）</span><span><br/></span><span>-------------------------------</span><span><br/></span><span>basename 可以理解为取路径里的文件名称</span><span><br/></span><span>选项： </span><span><br/></span><span>suffix 为后缀，如果 suffix 被指定了，basename 会将 pathname 或 string 中的 suffix 去掉。</span><span><br/></span><span>-------------------------------</span><span><br/></span><span>basename /home/xing/123.txt </span><span><br/></span><span>123.txt</span><span><br/></span><span>basename /home/xing/123.txt .txt</span><span><br/></span><span>123</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. dirname</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>dirname 文件绝对路径 </span><span><br/></span><span>（功能描述：从给定的包含绝对路径的文件名中去除文件名 （非目录的部分），然后返回剩下的路径（目录的部分））</span><span><br/></span><span>------------------------------</span><span><br/></span><span>dirname 可以理解为取文件路径的绝对路径名称</span><span><br/></span><span>------------------------------</span><span><br/></span><span>dirname /home/xing/123.txt </span><span><br/></span><span>/home/xing</span></div></pre></div></li></ol><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>2. 自定义函数</span></h3><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;list-style:none;margin:0;padding:0 0 0 1em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:14px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. 基本语法</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>[ function ] funname[()] </span><span><br/></span><span>{ </span><span><br/></span><span>    Action; </span><span><br/></span><span>    [return int;] </span><span><br/></span><span>}</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. 经验技巧</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>（1）必须在调用函数地方之前，先声明函数，shell 脚本是逐行运行。不会像其它语言一 样先编译。</span><span><br/></span><span>（2）函数返回值，只能通过$?系统变量获得，可以显示加：return 返回，如果不加，将以最后一条命令运行结果，作为返回值。</span><span><br/></span><span>     return 后跟数值 n(0-255)</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>3. 案例实操</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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><span><br/></span><span>#!/bin/bash </span><span><br/></span><span>function sum() </span><span><br/></span><span>{ </span><span><br/></span><span>    s=0 </span><span><br/></span><span>    s=$[$1+$2] </span><span><br/></span><span>    echo &quot;$s&quot; </span><span><br/></span><span>}</span><span><br/></span><span>read -p &quot;Please input the number1: &quot; n1; </span><span><br/></span><span>read -p &quot;Please input the number2: &quot; n2; </span><span><br/></span><span>sum $n1 $n2;</span></div></pre></div></li></ol><div><span><br/></span></div><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;font-size:16.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0 0.2em;color:rgb(255,255,255);background:rgb(15,76,129)\\\"><span>文本处理工具</span></h2><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>1. cut</span></h3><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;list-style:none;margin:0;padding:0 0 0 1em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:14px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. 基本用法</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>cut [选项参数] filename </span><span><br/></span><span>说明：默认分隔符是制表符</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. 选项参数说明</span><div style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;padding: 0px 8px;max-width: 100%;overflow: auto;\\\"><table style=\\\"box-sizing:border-box;border-width:0px;border-style:solid;border-color:inherit;transition:all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;text-indent:0px;border-collapse:collapse;border-spacing:0px;min-width:129px;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>选项参数</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>功能</span></div></td></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-f</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>列号，提取第几列</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-d</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>分隔符，按照指定分隔符分割列，默认是制表符“\\\\t”</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-c</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>按字符进行切割 后加加 n 表示取第几列 比如 -c 1</span></div></td></tr></tbody></table></div></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>3. 例子</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>（1）切割 cut.txt 第二、三列</span><span><br/></span><span>  cut -d &quot; &quot; -f 2,3 cut.txt</span><span><br/></span><span>（2）选取系统 PATH 变量值，第 2 个“：”开始后的所有路径：</span><span><br/></span><span>  echo $PATH | cut -d &quot;:&quot; -f 3-</span><span><br/></span><span>（3）切割 ifconfig 后打印的 IP 地址</span><span><br/></span><span>  ifconfig eth0 | grep inet[^0-9] | cut -d &quot; &quot; -f 10</span><span><br/></span><span>  // 172.16.100.14</span></div></pre></div></li></ol><h3 style=\\\"box-sizing:border-box;border-width:0 0 0 3px;border-style:solid;border-left-color:rgb(15,76,129);transition:none 0 ease 0;font-size:15.4px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:1.2;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:8px;color:rgb(63,63,63)\\\"><span>2. awk</span></h3><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;list-style:none;margin:0;padding:0 0 0 1em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:14px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. 基本用法</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>awk [选项参数] ‘/pattern1/{action1} /pattern2/{action2}...’ filename </span><span><br/></span><span>pattern：表示 awk 在数据中查找的内容，就是匹配模式 </span><span><br/></span><span>action：在找到匹配内容时所执行的一系列命令</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. 选项参数</span><div style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;padding: 0px 8px;max-width: 100%;overflow: auto;\\\"><table style=\\\"box-sizing:border-box;border-width:0px;border-style:solid;border-color:inherit;transition:all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;text-indent:0px;border-collapse:collapse;border-spacing:0px;min-width:165px;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>选项参数</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>功能</span></div></td></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-F</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>指定输入文件分隔符</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>-v</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>赋值一个用户定义变量</span></div></td></tr></tbody></table></div></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>3. 例子</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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 style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>1</span></span><span>. 搜索 passwd 文件以 root 关键字开头的所有行，并输出该行的第 </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>7</span></span><span> 列。</span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;font-weight: 700;color: navy;\\\"><span>cat</span></span><span> passwd | awk </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><span>-F</span></span><span> : </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(0, 85, 0);\\\"><span>'/^root/{print $7}'</span></span><span>       </span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(119, 119, 119);\\\"><span>## /bin/bash</span></span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>2</span></span><span>. 搜索 passwd 文件以 root 关键字开头的所有行，并输出该行的第 </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>1</span></span><span> 列和第</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>7</span></span><span>列， 中间以“，”号分割。</span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;font-weight: 700;color: navy;\\\"><span>cat</span></span><span> passwd | awk </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><span>-F</span></span><span> : </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(0, 85, 0);\\\"><span>'/^root/{print $1&quot;,&quot;$7}'</span></span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(119, 119, 119);\\\"><span>## root,/bin/bash</span></span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>3</span></span><span>. 只显示/etc/passwd 的第一列和第七列，以逗号分割，且在所有行前面添加列名 user，shell 在最后一行添加</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(0, 85, 0);\\\"><span>&quot;xing，/bin/xing&quot;</span></span><span>。</span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;font-weight: 700;color: navy;\\\"><span>cat</span></span><span> passwd | awk </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><span>-F</span></span><span> : </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(0, 85, 0);\\\"><span>'BEGIN{print &quot;user, shell&quot;} {print $1&quot;,&quot;$7} END{print &quot;xing,/bin/xing&quot;}'</span></span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(119, 119, 119);\\\"><span>## 注意：BEGIN 在所有数据读取行之前执行；END 在所有数据执行之后执行。</span></span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>4</span></span><span>. 将 passwd 文件中的用户 id 增加数值 </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>1</span></span><span> 并输出</span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;font-weight: 700;color: navy;\\\"><span>cat</span></span><span> passwd | awk </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>-v</span></span><span> i=</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>1</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><span>-F</span></span><span> : </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(0, 85, 0);\\\"><span>'{print $3+i}'</span></span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>4. awk 的内置变量</span><div style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;padding: 0px 8px;max-width: 100%;overflow: auto;\\\"><table style=\\\"box-sizing:border-box;border-width:0px;border-style:solid;border-color:inherit;transition:all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;text-indent:0px;border-collapse:collapse;border-spacing:0px;min-width:155px;\\\"><thead><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>变量</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>说明</span></div></td></tr></thead><tbody><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>FILENAME</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>文件名</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>NR</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>已读的记录数（行号）</span></div></td></tr><tr style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;\\\"><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>NF</span></div></td><td style=\\\"box-sizing: border-box;border: 1px solid rgb(223, 223, 223);transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;padding: 0.25em 0.5em;color: rgb(63, 63, 63);word-break: keep-all;\\\"><div><span>浏览记录的域的个数（切割后，列的个数）</span></div></td></tr></tbody></table></div></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;text-indent: -1em;display: block;margin: 0.2em 8px;color: rgb(63, 63, 63);\\\"><div><span>5. 案例</span><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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>1. 统计 passwd 文件名，每行的行号，每行的列数</span><span><br/></span><span>  awk -F : '{print &quot;filename:&quot; FILENAME &quot;,linenum:&quot; NR &quot;,col:&quot;NF}' passwd</span><span><br/></span><span>2. 查询 ifconfig 命令输出结果中的空行所在的行号</span><span><br/></span><span>  ifconfig | awk '/^$/{print NR}'</span><span><br/></span><span>3. 切割 IP</span><span><br/></span><span>  ifconfig eth0 | awk '/netmask/ {print $2}'</span></div></pre></div></li></ol><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;font-size:16.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0 0.2em;color:rgb(255,255,255);background:rgb(15,76,129)\\\"><span>清空文件内容</span></h2><pre style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14px;margin: 10px 8px;background-color: rgb(244, 244, 244);color: rgb(0, 0, 0);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><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 style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>1</span></span><span>. 使用</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;font-weight: 700;color: navy;\\\"><span>cat</span></span><span>命令情况，命令如下：</span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;font-weight: 700;color: navy;\\\"><span>cat</span></span><span> /dev/null &gt; file_name</span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(136, 0, 0);\\\"><span>2</span></span><span>. 使用</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;font-weight: 700;color: navy;\\\"><span>echo</span></span><span>命令清空，此时会在文件中写入一个空行“\\\\\n</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(0, 85, 0);\\\"><span>&quot;，命令如下：</span><span><br/></span><span>echo &quot;</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: hsl(var(--border));transition: none 0s ease 0s;color: rgb(0, 85, 0);\\\"><span>&quot;&gt;file_name</span></span></div></pre><p style=\\\"margin:0\\\"><span><br/></span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--border));transition:none 0 ease 0;margin:0;color:rgb(10,10,10);font-family:system-ui,&quot;PingFang SC&quot;,&quot;Helvetica Neue&quot;,&quot;Microsoft Yahei&quot;,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0;text-transform:none;white-space:normal;widows:2;word-spacing:0;-webkit-text-stroke-width:0;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;font-size:0;line-height:0\\\"><span> </span></p><div><span><br/></span></div></div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":118845}]"
metadata_diff: {"new":{"id":"6138c4cec31f4eaa8e1943930bc02484","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":1764348827885,"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:04:03.407Z
created_time: 2025-11-28T21:04:03.407Z
type_: 13