Do you mean the variable $? ?
$ python -c 'import foobar' > /dev/null Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named foobar $ echo $? 1 $ python -c 'import this' > /dev/null $ echo $? 0
source share