From: Junio C Hamano Date: Tue, 07 Jan 2020 01:42:58 GMT Subject: Re: [RFC PATCH] bisect run: allow inverting meaning of exit code Message-ID: In-Reply-To: Stephen Oberholtzer writes: > ... a clean, portable way to create a single case statement that > handles the final condition. Hmm, don't we want to say (1) original 0 (success) maps to 1 (2) original 125 maps to 125 (3) anything below 128 in the original maps to 0 and (4) everything else is left intact? Perhaps something as simple like this, taking advantage of the fact that $? won't have anything other than digits? ... do something ... status=$? case $status in 0) status=1 ;; 125) : as-is ;; ? | ?? | 1[01]? | 12[0-7]) status=0;; *) : as-is ;; esac I am still unclear where the need for {SUCCESS_FAIL}_TERM magic comes from, though.