Lockdown Offer: FLAT 75% + Addl. 25% Off + 30-days Extra Lab on ALL Courses | Use Coupon Code LD25 during Checkout | Offer Expires In

  Enroll Now

Linux Basics

60 / 88
   

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 $?