From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62331 invoked by alias); 23 Sep 2016 08:35:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 62310 invoked by uid 89); 23 Sep 2016 08:35:23 -0000 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 Received: from forward2o.cmail.yandex.net (HELO forward2o.cmail.yandex.net) (37.9.109.243) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Sep 2016 08:35:13 +0000 Received: from smtp1m.mail.yandex.net (smtp1m.mail.yandex.net [IPv6:2a02:6b8:0:2519::121]) by forward2o.cmail.yandex.net (Yandex) with ESMTP id 5E5FD20759; Fri, 23 Sep 2016 11:35:10 +0300 (MSK) Received: from smtp1m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1m.mail.yandex.net (Yandex) with ESMTP id 883BC63C0D77; Fri, 23 Sep 2016 11:35:08 +0300 (MSK) Received: by smtp1m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id akj5q88gap-Z7FmhRHD; Fri, 23 Sep 2016 11:35:07 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Authentication-Results: smtp1m.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Fri, 23 Sep 2016 08:33:39 -0000 Date: Fri, 23 Sep 2016 12:07:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <143545084.20160923113339@yandex.ru> To: "Gluszczak, Glenn" , cygwin@cygwin.com Subject: Re: Errorlevel In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B0BF7A0@MX204CL04.corp.emc.com> References: <91DCAC3CB99C724EB365BB64677FBE7B0BF747@MX204CL04.corp.emc.com> <91DCAC3CB99C724EB365BB64677FBE7B0BF7A0@MX204CL04.corp.emc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00297.txt.bz2 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@cygwin.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