How can I get Cygwin to see the NT ERRORLEVEL Environment Variable
Rick Rankin
rick_rankin@yahoo.com
Fri Feb 22 09:32:00 GMT 2002
ERRORLEVEL is a variable that is set and maintained by cmd.exe. The Cygwin
(actually bash) equivalent would be the variable $?, e.g.,
some_command param1 param2 ...
if [ $? != 0]
then
# The command failed
fi
There are a number of possible variations on this syntax. The equivalent exists
for csh/tcsh, but I don't use any of the csh-like shells, so I don't know the
syntax off the top of my head.
--Rick
--- Jon Belinfante <Jon_Belinfante@cwb.com> wrote:
> Doing echo $ERRORLEVEL on cygwin returns a blank
> where doing echo %ERRORLEVEL% at a DOS prompt returns 0.
>
> Has anyone got any ideas
>
>
>
>
>
******************************************************************************************************************************************************
> This e-mail has been prepared using information believed by the author to
> be
> reliable and accurate, but Thales Information Systems Finance makes no
> warranty as to accuracy or completeness. In particular Thales Information
> Systems Finance does not accept responsibility for changes made to this
> e-mail after it was sent. Any opinions expressed in this document are those
> of
> the author and do not necessarily reflect the opinions of the company or
> its
> affiliates. They may be subject to change without notice.
> This e-mail, its content and any files transmitted with it are intended
> solely for the addressee(s) and may be legally privileged and/or
> confidential. Access by any other party is unauthorised without the express
> written permission of the sender. If you have received this e-mail in error
> you
> may not copy or use the contents, attachments or information in any way.
> Please destroy it and contact the sender via the Thales Information Systems
> Finance switchboard in London at +44 (0) 20 7650 0100 or via e-mail return.
> This message and any attachments have been scanned
> for viruses prior to leaving the originators network. The originator does not
> guarantee the security of this message and will not be responsible for any
> damages arising from any alteration of this message by a third party or as a
> result of any virus being passed on.
>
*******************************************************************************************************************************************************
>
>
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list