uTools-Manuals/docs/linux/builtin.html
2019-04-21 11:50:48 +08:00

21 lines
1.3 KiB
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="builtin">builtin</h1>
<p>执行shell内部命令</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>builtin命令</strong> 用于执行指定的shell内部命令并返回内部命令的返回值。builtin命令在使用时将不能够再使用Linux中的外部命令。当系统中定义了与shell内部命令相同的函数时使用builtin显式地执行shell内部命令从而忽略定义的shell函数。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">builtin(参数)</code></pre>
<h3 id="参数">参数</h3>
<p>shell内部命令指定需要执行的shell内部命令。</p>
<h3 id="实例">实例</h3>
<p>使用builtin命令执行shell内部命alias显示命令别名输入如下命令</p>
<pre><code class="language-bash">builtin alias #执行shell内部指令
alias cp=&#39;cp -i&#39;
alias l.=&#39;ls -d .* --color=tty&#39;
alias ll=&#39;ls -l --color=tty&#39;
alias ls=&#39;ls --color=tty&#39;
alias mv=&#39;mv -i&#39;
alias rm=&#39;rm -i&#39;
alias which=&#39;alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde&#39;</code></pre>
<p>上面的命令执行后,将输出当前系统下的命令别名。</p>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->