Linux Essentials (010-160) — Question 66
What is the return value of a shell script after successful execution?
Answer options
- A. 1
- B. 0
- C. -1
- D. -255
- E. 255
Correct answer: B
Explanation
The correct return value for a shell script after it runs successfully is 0, which indicates no errors occurred. Other options such as 1, -1, -255, and 255 represent different error codes or statuses and are not indicative of a successful execution.