Quantcast
Channel: How to determine if an EXIT trap is defined for a BASH subshell? - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 2 View Live

Answer by David Anderson for How to determine if an EXIT trap is defined for...

When Using Bash 3The answer depends on the version of bash you are using. For example, my Mac, with macOS High Sierra installed, by default uses GNU bash, version 3.2.57(1)-release...

View Article



How to determine if an EXIT trap is defined for a BASH subshell?

Below is a example BASH script.#!/bin/bashexithdl() { echo "in exithdl subshell=$BASH_SUBSHELL">&2}trap exithdl EXITfun() { echo "in fun subshell=$BASH_SUBSHELL">&2 trap -p EXIT...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images