Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用watch -n1 './script.sh'每秒运行 1 分钟然后停止的“watch”命令。您将如何通过使用管道或非常短的 for/while 循环来实现这一点。谢谢。
watch -n1 './script.sh'
我发现一种方法是使用“超时”
timeout -sHUP 1m watch -n1 ./script.sh
有人知道其他方法吗?