目录
原文:https://www.cnblogs.com/zhengbin/p/9513762.html
实现方案:
1.命令结尾添加:&
+ View code
#/bin/bash
all_num=10
a=$(date +%H%M%S)
for num in `seq 1 ${all_num}`
do {
sleep 1
echo ${num}
} &
done
b=$(date +%H%M%S)
echo -e "startTime:\t$a"
echo -e "endTime:\t$b"