这是可能的,以秒为单位为脚本提供最大时间执行?
例如,我有脚本,可以 ping 一些网络。通常,它需要大约 10 秒,但如果执行需要超过 10 秒,只需将其杀死。
shell timeout
shell ×1
timeout ×1