How to trap on exit 1 only in bash

前端 未结 0 738
盖世英雄少女心
盖世英雄少女心 2020-12-23 15:20

I have the following bash script:

#!/bin/bash


function hello {
    echo "Hello World!"
}

trap hello EXIT

The problem is that thi

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