Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Nov 1999 14:26:28 -0500 (EST)
From:      William Melanson <wjm@gate.net>
To:        slava revutchi <sl@zeus.dnt.md>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: shell's exit status variable
Message-ID:  <Pine.A41.4.03.9911081423040.59796-100000@tiwa.gate.net>
In-Reply-To: <Pine.BSF.4.05.9911081928230.61689-100000@zeus.dnt.md>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Nov 1999, slava revutchi wrote:

% 
% Hello,
% 
% How do I check the shell's exit status variable?
% 
% Thanks.
% slava
% 

I know within the bash shell it would be as such:

>[script]; echo $?

The "$?" varaible prints the exit status of the last command run.
Either a "1" or "0".

- Bill

--------------------------------oOo------------------------------------
  William  J. Melanson        CyberGate, Inc. | e.spire Communications
  Sr Network Controller       Deerfield Beach, FL 33441 
  Network Operations Center   Phone: (954) 429-8080
  finger wjm@gate.net         PGP public key
--------------------------------oOo------------------------------------



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.A41.4.03.9911081423040.59796-100000>