bash trap ctrl c and continue to next function

后端 未结 0 459
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-02 15:56
#!/usr/bin/env bash

# trap ctrl-c and call ctrl_c()
trap ctrl_c INT

function ctrl_c() {
    echo
    echo "** Trapped CTRL-C: Skipping Current Task **"
    e         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题