2 ms·
You can over-rely on "set -e" however: #!/usr/bin/env bash set -e fail() { false ; echo hello; } if ! fail; then :; fi That outputs "hello" and exits
by switch007 10y ago
You can over-rely on "set -e" however:
#!/usr/bin/env bash
set -e
fail() { false ; echo hello; }
if ! fail; then :; fi
That outputs "hello" and exits with 0.