bash-timeout:Bash编写的超时功能

时间:2021-05-11 10:40:50
【文件属性】:
文件名称:bash-timeout:Bash编写的超时功能
文件大小:9KB
文件格式:ZIP
更新时间:2021-05-11 10:40:50
shell bash timeout shell-script Shell 重击超时 是命令,也是bash函数,用于在目标命令未在指定的持续时间内完成时终止目标命令。 通过重定向(<FILE)或管道(|)的输入将透明地传输到目标命令。 如果目标命令在持续时间内完成,则保留目标命令的退出状态。 GNU coreutils中的是类似的命令,具有超时功能。 在shell脚本中,bash-timeout使脚本比GNU超时更简单。 有关更多详细信息,请参见 。 正在安装 通过点 $ pip install bash-timeout 用法 用作linux / unix命令 $ bash-timeout 10s sleep 20s 用作bash功能 source bash-timeout timeout 10s sleep 20s bash脚本中的一个示例 source bash-timeout function very_expensive_task() {
【文件预览】:
bash-timeout-master
----LICENSE.txt(1KB)
----README.md(4KB)
----docs()
--------comparison.md(2KB)
--------CONTRIBUTING.md(1KB)
--------DCO1.1-2.txt(2KB)
----tests()
--------test_all.sh(698B)
--------test_bash-timeout.bats(2KB)
----.gitignore(76B)
----bin()
--------bash-timeout(3KB)
----metainfo.csv(680B)

网友评论