Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

add example debug script with trap #107

Open
vay3t opened this issue Oct 21, 2020 · 0 comments
Open

add example debug script with trap #107

vay3t opened this issue Oct 21, 2020 · 0 comments

Comments

@vay3t
Copy link

vay3t commented Oct 21, 2020

debug script with trap

  • Example:
function exit_trap() {
        local lc="$BASH_COMMAND" rc=$?
        echo "Command [$lc] exited with code [$rc]"
}

trap exit_trap err
@dylanaraps dylanaraps transferred this issue from dylanaraps/pure-sh-bible Oct 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant