命令简介
可以把当前执行动作延迟指定的时间,以秒为单位。sleep命令经常用于shell脚本的编写。
The sleep command suspends execution of a process for at least the interval specified by the Seconds parameter. The amount of time specified in the Seconds parameter can range from 1 to MAXINT (2,147,483,647) seconds.
命令语法
sleep Seconds
例子 :
显示目前时间后延迟 1 分钟,之后再次显示时间 :
date; sleep 60; date;
一个shell脚本的示例:
while true
do
date
sleep 60
done
Post a comment now »
本文目前不可评论
Sorry, the comment form is closed at this time.
No comments yet.