You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
698 B

7 years ago
wait
===
等待进程执行完后返回
6 years ago
## 说明
7 years ago
5 years ago
**wait命令** 用来等待指令的指令直到其执行完毕后返回终端。该指令常用于shell脚本编程中待指定的指令执行完成后才会继续执行后面的任务。该指令等待作业时在作业标识号前必须添加备份号"%"
7 years ago
5 years ago
## 选项
7 years ago
```
wait(参数)
```
### 参数
5 years ago
进程或作业标示:指定进程号或者作业号
7 years ago
5 years ago
## 实例
7 years ago
使用命令wait等待作业号为1的作业完成后再返回输入如下命令
```
wait %1 #等待作业号为3的作业完成
```
执行上面的指令后,将输出指定作业号的指令,如下所示:
```
find / -name password
```