Errorlevel

Gluszczak, Glenn Glenn.Gluszczak@dell.com
Thu Sep 22 18:56:00 GMT 2016


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



More information about the Cygwin mailing list