delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/09/22/14:56: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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type:content-transfer-encoding;
q=dns; s=default; b=p00FbtI1nLH6yA3JZe3eU2oChlJUfm2geR+IoWO8MrC
9VKTKYmLI9okRNTozoXOSLHQzJG6tuYlF4kbHHwGOs4OHAvzydGC3xBqDYYUq2Qt
9fkf7vRaAJYcWgN7C7VmVPltO4ObcT8FVroojfnqUr8ERH4UIjfPb7U3POLVCRjI
=
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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type:content-transfer-encoding;
s=default; bh=/i8VPNDyknLgj9UtbkAzvQps85Y=; b=Tlm2vdpQQVw+Y5m13
OVRZ0sG0oZt0Z/xCE9DvThctqxPEzbbkLwO8PUiLnWFZSHvYqmhCoLVSplDH+dLM
JUxybx6b2o0fj0/1j6tXqf+TbKwxWDQI9CvQJSHVMLaAPi87wMdhoqbU21asvgBg
c+BmDuzNmLv1yZnZR31wbeZnto=
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: =?ISO-8859-1?Q?No, score=0.6 required=5.0 tests=BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=hasta, seguridad, est=c3=a1, estado?=
X-HELO: mail-qk0-f174.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=S6dZZAYFDr/uVXlb1mLFoY+CtxDL9zgINAhvr/kPJRs=; b=jWxSsknOt+jyoZ9QrN7jUX1KhIP+KprcY3X43GF3WC/l/QlYY2Veox9WDDOQeq3qbo YEMUEZh2D6GGbAdYfdhSGa1lqVoKyiqAQohHs9Yx40FCsJtR+CjvhIOtafpZhZpHgibu byOtx0kBDkPZlzf7qipcrFZPk5fky1IcmRseEwn3NYxBTbNbohLFyHPlQAcJM0q98CvY mzufW5BWXLuQeXmgra7UdLDEJe7TpS37dbUeRxPsRaR4SYYNk1Br367vLspkXhOCx0oB mupfe03mRZ0ABGF8tUi6GzJidcmmr17QOqgJgubcGKQRRFvmDyLWWOHWIAnant0dzfZD /lPQ==
X-Gm-Message-State: AA6/9RmtmEGV3HX4/2+ImqyyeYM35NCPbxxJCt47Ybn28UquVQ57w14KhK49KLvr/uIzxO8jBBslBo1V9cRngA==
X-Received: by 10.55.9.132 with SMTP id 126mr3834525qkj.234.1474570570043; Thu, 22 Sep 2016 11:56:10 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B0BF747@MX204CL04.corp.emc.com>
References: <91DCAC3CB99C724EB365BB64677FBE7B0BF747 AT MX204CL04 DOT corp DOT emc DOT com>
From: SPC <spedraja AT gmail DOT com>
Date: Thu, 22 Sep 2016 20:55:49 +0200
Message-ID: <CACytpF_OJnh6YoG0M8i2ekEXYnTh7cZjF=LL715b1QLG4hVMBg@mail.gmail.com>
Subject: Re: Errorlevel
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u8MIuYcq007753

In appereance it happens with standard DOS commands too:


C:\windows\system32>dir foo

 Directorio de C:\windows\system32

No se encuentra el archivo

C:\windows\system32>echo %errorlevel%
1

C:\windows\system32>ls foo
ls: cannot access 'foo': No such file or directory

C:\windows\system32>echo %errorlevel%
2

C:\windows\system32>dir foo

 Directorio de C:\windows\system32

No se encuentra el archivo

C:\windows\system32>echo %errorlevel%
1


Gracias | Regards - Saludos | Greetings | Freundliche Grüße | Salutations
-- 
Sergio Pedraja
-- 
twitter: @sergio_pedraja | skype: Sergio Pedraja
-----
No crea todo lo que ve, ni crea que está viéndolo todo
-----
"El estado de una Copia de Seguridad es desconocido
hasta que intentas restaurarla" (- nixCraft)


2016-09-22 20:47 GMT+02:00 Gluszczak, Glenn <Glenn DOT Gluszczak AT dell DOT com>:
>
> 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
>

--
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