Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Lotus-FromDomain: CWB From: "Jon Belinfante" To: Rick Rankin cc: cygwin AT cygwin DOT com Message-ID: <80256B68.0060375B.00@venus.cwb.com> Date: Fri, 22 Feb 2002 17:26:07 +0000 Subject: Re: How can I get Cygwin to see the NT ERRORLEVEL Environment Variable Thank you Rick - this is most helpful - and exactly as needed. With kind regards Jon Belinfante |--------+-----------------------> | | Rick Rankin | | | | | | | | | 22/02/02 | | | 17:23 | | | | |--------+-----------------------> >---------------------------------------------------------------------| | | | To: Jon Belinfante/London/CWB AT CWB, cygwin AT cygwin DOT com | | cc: | | Subject: Re: How can I get Cygwin to see the NT ERRORLEVEL| | Environment Variable | >---------------------------------------------------------------------| 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 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/