这是否有可能,在秒内给出最大的时间来编写执行脚本?
例如,我有一个脚本,那个脚本可以调用某个网络。通常情况下,它大约需要10秒,但是如果执行时间超过10秒,只需杀死它。
发布于 2015-10-11 19:17:33
使用timeout命令,例如time 10s myscript。
man timeout
TIMEOUT(1) User Commands TIMEOUT(1)
NAME
timeout - run a command with a time limithttps://unix.stackexchange.com/questions/235441
复制相似问题