ADD: bash Simple-concurrency
This commit is contained in:
parent
43853f7dda
commit
1b10d1aa28
11
os/linux/knowledge/bash/Simple-concurrency.sh
Normal file
11
os/linux/knowledge/bash/Simple-concurrency.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 并行运行多个命令
|
||||||
|
command1 &
|
||||||
|
command2 &
|
||||||
|
command3 &
|
||||||
|
|
||||||
|
# 等待所有后台任务完成
|
||||||
|
wait
|
||||||
|
|
||||||
|
echo "所有任务执行完毕"
|
Loading…
x
Reference in New Issue
Block a user