#!/usr/bin/env bash die() { echo "$@" >&2 } command_failed() { die "command failed" } trap command_failed ERR false && echo this does not execute false || echo this code executes epatch