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

15 lines
1.0 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="wait">wait</h1>
<p>等待进程执行完后返回</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>wait命令</strong> 用来等待指令的指令直到其执行完毕后返回终端。该指令常用于shell脚本编程中待指定的指令执行完成后才会继续执行后面的任务。该指令等待作业时在作业标识号前必须添加备份号“%”。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">wait(参数)</code></pre>
<h3 id="参数">参数</h3>
<p>进程或作业标示:指定进程号或者作业号。</p>
<h3 id="实例">实例</h3>
<p>使用命令wait等待作业号为1的作业完成后再返回输入如下命令</p>
<pre><code class="language-bash">wait %1 #等待作业号为3的作业完成 </code></pre>
<p>执行上面的指令后,将输出指定作业号的指令,如下所示:</p>
<pre><code class="language-bash">find / -name password</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->