2019-04-21 11:50:48 +08:00

24 lines
940 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="expr">expr</h1>
<p>一款表达式计算工具</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>expr命令</strong> 是一款表达式计算工具,使用它完成表达式的求值操作。</p>
<p>expr的常用运算符</p>
<ul>
<li>加法运算:+</li>
<li>减法运算:-</li>
<li>乘法运算:*</li>
<li>除法运算:/</li>
<li>求摸(取余)运算:%</li>
</ul>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">expr(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">--help显示指令的帮助信息
--version显示指令版本信息。</code></pre>
<h3 id="参数">参数</h3>
<p>表达式:要求值的表达式。</p>
<h3 id="实例">实例</h3>
<pre><code class="language-bash">result=`expr 2 + 3`
result=$(expr $no1 + 5)</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->