O'Reilly logo

Solaris™ 8 Advanced System Administrator's Guide, Third Edition by Janice Winsor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exit Status

When a command or shell function terminates, it returns an exit status to the invoking shell. The exit status is a numeric value that indicates whether the program ran successfully and whether certain events occurred in the command.

Every command that runs has an exit status, which is set by the programmer when writing the command. Usually, an exit status of 0 means that the program executed successfully. Any non-zero value (usually 1 or -1) means that the program failed. Programmers may not always follow this convention. Check the manual page for a given command to determine its exit status. For example, the grep command returns one of three exit status values: 0 means that the search pattern was found, 1 means that the pattern could ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required