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, S
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 i
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:\wi
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\h
> set EXITCODE=%1
> echo got here with %1
> exit /b %EXITCODE%
> $ cmd /c c:/DOCUME~1/pwatson/bin/myexit.bat 8
> got here with 8
> $ echo $?
> 0
Carry this case to appropriate forums.
[C:\]$ cat test.bat
cmd.exe /C C:\testcase.bat
echo %ERRORLEVEL%
[C:\]$ cat testcas
On 10/11/2013 11:53 AM, Christopher Faylor wrote:
On Fri, Oct 11, 2013 at 10:42:47AM -0400, Earnie Boyd wrote:
On Fri, Oct 11, 2013 at 10:35 AM, Nellis, Kenneth wrote:
From: Larry Hall (Cygwin)
On 10/11/2013 8:27 AM, paul hermeneutic wrote:
I am using CYGWIN_NT-5.1 PAC047922 1.7.25(0.270/5/3)
On Fri, Oct 11, 2013 at 10:42:47AM -0400, Earnie Boyd wrote:
>On Fri, Oct 11, 2013 at 10:35 AM, Nellis, Kenneth wrote:
>>> From: Larry Hall (Cygwin)
>>>
>>> On 10/11/2013 8:27 AM, paul hermeneutic wrote:
>>> > I am using CYGWIN_NT-5.1 PAC047922 1.7.25(0.270/5/3) 2013-08-31 20:39
>>> > i686 Cygwin
>
On Fri, Oct 11, 2013 at 10:35 AM, Nellis, Kenneth wrote:
>> From: Larry Hall (Cygwin)
>>
>> On 10/11/2013 8:27 AM, paul hermeneutic wrote:
>> > I am using CYGWIN_NT-5.1 PAC047922 1.7.25(0.270/5/3) 2013-08-31 20:39
>> > i686 Cygwin
>> >
>> > An exit code returned by a DOS batch file does not seem to
> From: Larry Hall (Cygwin)
>
> On 10/11/2013 8:27 AM, paul hermeneutic wrote:
> > I am using CYGWIN_NT-5.1 PAC047922 1.7.25(0.270/5/3) 2013-08-31 20:39
> > i686 Cygwin
> >
> > An exit code returned by a DOS batch file does not seem to be coming
> > back to the Cygwin shell. I am using bash.
> >
On 10/11/2013 8:27 AM, paul.hermeneu...@gmail.com wrote:
I am using CYGWIN_NT-5.1 PAC047922 1.7.25(0.270/5/3) 2013-08-31 20:39
i686 Cygwin
An exit code returned by a DOS batch file does not seem to be coming
back to the Cygwin shell. I am using bash.
$ cat myexit.bat
@echo off
set EXITCODE=%1
e
I am using CYGWIN_NT-5.1 PAC047922 1.7.25(0.270/5/3) 2013-08-31 20:39
i686 Cygwin
An exit code returned by a DOS batch file does not seem to be coming
back to the Cygwin shell. I am using bash.
$ cat myexit.bat
@echo off
set EXITCODE=%1
echo got here with %1
exit /b %EXITCODE%
$ cmd /c c:/DOCUME
I am using CYGWIN_NT-5.1 PAC047922 1.7.25(0.270/5/3) 2013-08-31 20:39
i686 Cygwin
An exit code returned by a DOS batch file does not seem to be coming
back to the Cygwin shell. I am using bash.
$ cat myexit.bat
@echo off
set EXITCODE=%1
echo got here with %1
exit /b %EXITCODE%
$ cmd /c c:/DOCUME
Greetings, All!
Relevant lines from setup.log.full:
2013/07/16 10:52:34 running: C:\Programs\CygWin\bin\bash.exe --norc --noprofile
"/etc/postinstall/libdb4.8-devel.sh"
admindir /var/lib/alternatives invalid
admindir /var/lib/alternatives invalid
2013/07/16 10:52:34 abnormal exit: exit code=2
T
e) C:\>ssh delhi net The syntax of this command is:
>>>>
>>>> NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
>>>> HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
>>>> SHARE | START | ST
t; NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
> > HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
> > SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
> >
> >
> > C:\>echo %errorlevel%
> &g
t;>
>> NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
>> HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
>> SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
>>
>>
>> C:\>echo %errorlevel%
>>
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
> SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
>
>
> C:\>echo %errorlevel%
> 0
>
> ANALYSIS:
> The errorlevel returned from the second command should be "1"
> instead o
On Mon, Aug 27, 2007 at 11:55:23AM -0700, [EMAIL PROTECTED] wrote:
>Here are the command sequence I ran on Windows 2003 x86 SP2 servers (delhi is
>the hostname)
>
>C:\>ssh delhi hostname
>delhi
>
>C:\>echo %errorlevel%
>0
>
>C:\>ssh delhi net
>The synt
Here are the command sequence I ran on Windows 2003 x86 SP2 servers (delhi is
the hostname)
C:\>ssh delhi hostname
delhi
C:\>echo %errorlevel%
0
C:\>ssh delhi net
The syntax of this command is:
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | L
PROTECTED] |
| cc: |
| Subject: Re: How can I get Cygwin to see the NT ERRORLEVEL|
| Environment
Jon Belinfante wrote:
>
> Doing echo $ERRORLEVEL on cygwin returns a blank
I suppose you mean in a bash shell.
> where doing echo %ERRORLEVEL% at a DOS prompt returns 0.
>
> Has anyone got any ideas
>
Yes, where did you get the idea that $ERRORLEVEL should have any speci
ERRORLEVEL is a variable that is set and maintained by cmd.exe. The Cygwin
(actually bash) equivalent would be the variable $?, e.g.,
some_command param1 param2 ...
if [ $? != 0]
then
# The command failed
fi
There are a number of possible variations on this syntax. The equivalent exists
for
Doing echo $ERRORLEVEL on cygwin returns a blank
where doing echo %ERRORLEVEL% at a DOS prompt returns 0.
Has anyone got any ideas
**
This e
23 matches
Mail list logo