Exit Codes & && || ; Chaining Playground

The Warnet Desa’s night script: each job runs in a model bash with its real status, a green lamp for 0. && only on success, || on failure, ; always; plus set…

Why it matters

CI green while the build failed, a deploy that runs after the tests failed, a script that stops halfway without a word: all about exit statuses. 0 means success (the opposite of false in many languages), and $? keeps only the last one.

The key idea

0 is success, and $? is only the last one

Common mistakes

Try it in this playground