* Errorlevel
@ 2016-09-22 18:56 Gluszczak, Glenn
2016-09-22 19:13 ` Errorlevel SPC
2016-09-22 19:55 ` Errorlevel Gluszczak, Glenn
0 siblings, 2 replies; 4+ messages in thread
From: Gluszczak, Glenn @ 2016-09-22 18:56 UTC (permalink / raw)
To: 'cygwin@cygwin.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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Errorlevel
2016-09-22 18:56 Errorlevel Gluszczak, Glenn
@ 2016-09-22 19:13 ` SPC
2016-09-22 19:55 ` Errorlevel Gluszczak, Glenn
1 sibling, 0 replies; 4+ messages in thread
From: SPC @ 2016-09-22 19:13 UTC (permalink / raw)
To: cygwin
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.Gluszczak@dell.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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Errorlevel
2016-09-22 18:56 Errorlevel Gluszczak, Glenn
2016-09-22 19:13 ` Errorlevel SPC
@ 2016-09-22 19:55 ` Gluszczak, Glenn
2016-09-23 12:07 ` Errorlevel Andrey Repin
1 sibling, 1 reply; 4+ messages in thread
From: Gluszczak, Glenn @ 2016-09-22 19:55 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
Sorry it's a Windows defect. Builtin CMD echo does not set an errorlevel.
Glenn
-----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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Errorlevel
2016-09-22 19:55 ` Errorlevel Gluszczak, Glenn
@ 2016-09-23 12:07 ` Andrey Repin
0 siblings, 0 replies; 4+ messages in thread
From: Andrey Repin @ 2016-09-23 12:07 UTC (permalink / raw)
To: Gluszczak, Glenn, cygwin
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-23 8:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 18:56 Errorlevel Gluszczak, Glenn
2016-09-22 19:13 ` Errorlevel SPC
2016-09-22 19:55 ` Errorlevel Gluszczak, Glenn
2016-09-23 12:07 ` Errorlevel Andrey Repin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).