delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/09/23/04:35:41

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=wfcea2cLTsvnx1bk
0yI9uE2ZetAVzDY1VHqMqLD6wVBo0DeXfHnxpmU8x0sEH/wZMjkRueMnFkdw/4my
VPY5pOUwCIWPatc2Q3JxBG4rtfFwSx1reeTWttH5/hgc1HPmUTMCfxAdULCwgcwJ
USJikviddRoJJkNOEleblRLDNtk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=Fo9PIzK/NXEdAJopCvTPro
5c+LQ=; b=BKpO3Ye976AVRKx28PdKIHsL/JKsjfuqJI9SDP58EDWxoJy2VZnwv1
bBJzk/A8+q1GHGUmTBk0RBdfxw//b9+Z0GUk2v+acpzGLrMMAMZKBUt/VaFv+8wX
8fRXNhsfRDCxsD0Ld1FdK5n3dFVf/j9dLHDq1ny6LqREkbTB4ca8g=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=BAYES_05,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=rights, HX-Priority:Normal, Administrator, reserved
X-HELO: forward2o.cmail.yandex.net
Authentication-Results: smtp1m.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-Suid-Status: 1 0,1 0
Date: Fri, 23 Sep 2016 11:33:39 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <143545084.20160923113339@yandex.ru>
To: "Gluszczak, Glenn" <Glenn DOT Gluszczak AT dell DOT com>, cygwin AT cygwin DOT com
Subject: Re: Errorlevel
In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B0BF7A0@MX204CL04.corp.emc.com>
References: <91DCAC3CB99C724EB365BB64677FBE7B0BF747 AT MX204CL04 DOT corp DOT emc DOT com> <91DCAC3CB99C724EB365BB64677FBE7B0BF7A0 AT MX204CL04 DOT corp DOT emc DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Gluszczak, Glenn!

> Sorry it's a Windows defect.  Builtin CMD echo does not set an errorlevel.

Since it is a documented effect, it's a feature.
Internal commands do not set %ERRORLEVEL%.

> -----Original Message-----
> From: Gluszczak, Glenn 
> Sent: Thursday, September 22, 2016 2:48 PM
> To: 'cygwin AT cygwin DOT com'
> Subject: Errorlevel

> Is this a known defect?  The errorlevel of the ls command is passed to the echo.

> $ cmd
> Microsoft Windows [Version 6.3.9600]
> (c) 2013 Microsoft Corporation. All rights reserved.

> C:\cygwin64\home\Administrator>del c:\tmp\hello del c:\tmp\hello Could Not Find c:\tmp\hello

> C:\cygwin64\home\Administrator>ls foo
> ls foo
> ls: cannot access 'foo': No such file or directory

> C:\cygwin64\home\Administrator>echo hello > c:\tmp\hello echo hello > c:\tmp\hello

> C:\cygwin64\home\Administrator>echo %errorlevel% echo %errorlevel%
> 2

> C:\cygwin64\home\Administrator>del c:\tmp\hello del c:\tmp\hello

> C:\cygwin64\home\Administrator>echo hello > c:\tmp\hello echo hello > c:\tmp\hello

> C:\cygwin64\home\Administrator>echo %errorlevel% echo %errorlevel%
> 0


> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple




-- 
With best regards,
Andrey Repin
Friday, September 23, 2016 11:32:44

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019