# Errors a User Can Act On

A script people depend on says what went wrong and what to do about it: it prints problems on standard error with >&2, stops with an exit code that means something (0 it worked, 1 it failed, 2 it was run wrong), and keeps those habits in a die function and a usage message.

![Cheat sheet for the lesson Errors a User Can Act On: A script people depend on says what went wrong and what to do about it: it prints problems on standard error with >&2, stops with an exit code that means something (0 it worked, 1 it failed, 2 it was run wrong), and keeps those habits in a die…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/ed59fae8e72f49a89d46e987e2707774.webp)

- Category: Bash
- Level: Journeyman
- Tags: exit-code, linux, shell-function, standard-streams, unix, usage-message
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-script-errors-cheat-sheet
