Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    That is simply a convention made-up by whoever wrote that tutorial, and you shouldn't think too much about it. On Unix, the exit status is either success (0) or failure (anything but 0). There were efforts to standardize a set of meaningful error exit statuses (look at /usr/include/sysexits.h), but they didn't really catch on. Commented Mar 6, 2019 at 10:31
  • 1
    warning: the script's variables should be in lowercase... otherwise you risk "collision" with internal variables of your shell (ex here: LINES, which in many shells is (re-)set to the number of lines of the terminal emulator, and therefore could possibly change if the window is resized during the script's execution?) Commented Jul 8, 2019 at 14:09