# wait

等待进程执行完后返回

## 补充说明

**wait命令** 用来等待指令的指令，直到其执行完毕后返回终端。该指令常用于shell脚本编程中，待指定的指令执行完成后，才会继续执行后面的任务。该指令等待作业时，在作业标识号前必须添加备份号"%"。

### 语法

```
wait(参数)
```

### 参数

进程或作业标示：指定进程号或者作业号。

### 实例

使用命令wait等待作业号为1的作业完成后再返回，输入如下命令：

```
wait %1       #等待作业号为3的作业完成
```

执行上面的指令后，将输出指定作业号的指令，如下所示：

```
find / -name password
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hezhiqiang.gitbook.io/linux/ming-ling/wait.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
