Linux Basics

59 / 87
Program returns value and arguments

Every program return a value to operating system. It is also referred as exit status. In linux, a program returns 0 if successful. Otherwise a non-zero error number.

To check the return value of previous command you can check the value of a special variable "?"

    echo $?