【发布时间】:2015-12-04 07:45:16
【问题描述】:
我想在我的 shell 脚本中设置超时,这是我的代码:
/etc/init.d/ntp stop
until ping -nq -c3 8.8.8.8; do
echo "Waiting for network..."
done
ntpdate -s time.nist.gov
/etc/init.d/ntp start
我想设置超时 30 秒,如果超过 30 秒我想终止该进程并更改为该进程:
hwclock -s
谢谢
【问题讨论】:
-
为什么是python标签?