return-code

What is the Windows/cmd.exe equivalent of Linux/bash's $? -- the program exit/return code?

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

Exceptions vs return codes : do we lose something (while gaining something else) ?

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

easy way to see dos command return code

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

KSH shell script won't execute and returns 127 (not found)

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

Return code/ exit code for Oracle's DataPump API

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

Killing a process with taskkill /F returning code 0

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