我想做类似以下的事情:
怎么做呢?
#!/bin/bash
command1
<pause for 30 seconds>
command2
exit
怎么做呢?
#!/bin/bash
command1
<pause for 30 seconds>
command2
exit
command1; sleep 30; command2
#!/bin/bash
command1
sleep 30
command2
exit
s
表示秒(默认值)
- m
表示分钟
- h
表示小时
- d
表示天数read -t
命令。例如:read -p "Continuing in 5 seconds..." -t 5
echo "Continuing..."
command1
read -p 'Pausing for 30 seconds' -t 30
command2