How to handle bash exit codes in Linux

preview_player
Показать описание
An exit code, or sometimes known as a return code, is the code returned to a parent process by an executable. The exit status of a process in computer programming is a small number passed from a child process to a parent process when it has finished executing a specific procedure or delegated task.

The terminology for exit code is somewhat confusing, as people may call error codes "return codes" or "exit codes". In any case, interpreting those numbers helps observers to understand why a program crashed. On POSIX systems the standard exit code is 0 for success and any number from 1 to 255 for anything else.

POSIX or the Portable Operating System Interface is a standard application programming interface (API) used by Linux and many other operating systems (typically UNIX and UNIX-like systems). It makes it easier to write source code that can be compiled on different POSIX systems.

00:00 Introduction
01:15 how to get an exit code of a command
05:00 what exit code should be used
06:00 How to supress exit status

Join this channel to get access to perks:

#bash #BASH #bashCourse
Рекомендации по теме
Комментарии
Автор

Hi, may i know Why bash series was discontinued?

manikandan-mohh
Автор

You don't NEED to use nano to edit sh files. I hate it when people act like "x editor" is the ONLY option to open "x format" file. Just stop. There's Vim, emacs, neovim...hell, even GEdit or Geanie can edit shell scripts.

ChozoSR
visit shbcf.ru