Use:

echo $?

Example:

bilbo$ df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/hda1              19G  3.6G   14G  21% /

tmpfs                 253M     0  253M   0% /dev/shm

/dev/hda3              92G   35G   53G  40% /home

bilbo$ echo $?

0
Feedback

Powered by Vanilla PHP feedback form