In Unix/bash, I can simply say:
$ echo $?
to find out the return/exit code of a program, both from interactive and non-interactive shells.
Now, how can I do the equivalent in Windows/cmd.exe?
...
My question is pretty vague :o) - But here is an example :
When I was writing C code, I was able to log counter's value when something failed :
<...>
for ( int i = 0 ; i < n ; i++ )
if ( SUCCESS != myCall())
Log( "Failure, i = %d", i );
<...>
Now, using exceptions, I get this :
try
{
<...>
fo...
Sometimes I run a command in cmd such as:
fc /b file1 file2
and would like to see the return code from fc. Is there a simple way to do this?
...
Can anyone enlighten me why the following won't work?
$ groups
staff btgroup
$ ls -l
total 64
-rw-rw---- 1 sld248 btgroup 26840 Apr 02 13:39 padaddwip.jks
-rwxrwx--- 1 sld248 btgroup 1324 Apr 02 13:39 padaddwip.ksh
$ ./padaddwip.ksh
ksh: ./padaddwip.ksh: not found.
$ echo $?
127
This is nearly ident...
I wrapped oracle's IMPDP and EXPDP in a console and could not find a good place for the return codes that these two return. I want to be more specific in pointing out errors than just a 0/1 Pass/Fail.
...
Hi,
I need to kill a windows process (java.exe). I'm currently using:
taskkill.exe /F /IM java.exe
I need to use the /F option since is a critical process,but in this way I get a return code 1 instead I need a return code 0 (returned when I don't use /F for killing other not critical processes)
how could I fix this problem?
Many tha...