abqbill's exec15/exec.exe stdout not re-directed when -c switch is used

Respondida abqbill's exec15/exec.exe stdout not re-directed when -c switch is used

  • 2012年5月4日 4:01
     
     

    When I run the following from a batch file --

    "c:\program files\exec15\exec.exe"  -c -w -e  -- %cmd% %2 %3 %4 %5 > %logfile%

    the %cmd% command output is not redirected to %logfile%. The -e report DOES go to %logfile%. When I run the same without the -c, both the %cmd% output and the -e report are redirected to %logfile%.

    Also, (with -c) the %cmd% console window flashes briefly and then goes away when the %cmd% finishes.

全部回复

  • 2012年5月4日 8:30
     
     

    Hard to say without knowing what the following might be:
    - exec.exe
    - %cmd%
    - %2, %3, %4, %5
    - %logfile%

    Also, what do the -c -w -e -- switches mean?

  • 2012年5月4日 14:25
    版主
     
     

    Hi Oberwald/Pegasus,

    He's talking about exec15.zip.

    Hi Phil,

    What's your question? (You posted your observations, but not a question.)

    Bill

  • 2012年5月4日 14:32
     
     

    Hi Oberwald/Pegasus,

    Bill, how did you find me out?!
  • 2012年5月4日 14:38
    版主
     
     
    Bill, how did you find me out?!

    It was a good guess <grin>

    Bill

  • 2012年5月4日 19:16
     
     

    is this normal behavior

  • 2012年5月4日 19:22
    版主
     
     

    Is what normal behavior?

    Bill

  • 2012年5月4日 19:29
    版主
     
     已答复 包含代码

    OK. Let me try to guess what you mean...

    If you use a command like:

    exec -c -e -- command > output.txt

    The command's output isn't stored in output.txt, but the program's elapsed time is stored in output.txt.

    -c means "create a new console." This new console has its own stdout, which is separate from the stdout in the console from which you executed the exec command. So of course, the new console's output won't appear in output.txt.

    Does this answer your question?

    Bill

  • 2012年5月4日 21:16
     
     

    http://www.westmesatech.com/files/exec15.zip

    I don't think the specific values in the variables have any bearing on the issues. %cmd% contains the name of a batch file that exec15 will run. %logfile% is the path/filename of %cmd%'s redirected stdout.

  • 2012年5月4日 21:19
    版主
     
     

    Hi,

    I don't think we're communicating very well. What's your question? (Please be as concise and specific as possible.)

    Bill

  • 2012年5月4日 22:03
     
     
    Never mind. This is clearly beyond my level of expertise. I'll find another way.
  • 2012年5月5日 8:19
     
     
    Never mind. This is clearly beyond my level of expertise. I'll find another way.

    Don't give up.  Just describe what it is you aer trying to do.  Mutliple redirection issues are beyond most peoples level.  If you explain what you are trying to do I am sure Bill will help you if it is possible.


    ¯\_(ツ)_/¯

  • 2012年5月7日 14:10
    版主
     
     
    Never mind. This is clearly beyond my level of expertise. I'll find another way.

    Hi,

    Sorry -- again -- another way to do what? As jrv said, I am glad to help, but 1) I can't read your mind and 2) I can't see your screen. If you have a question, feel free to ask, but please include all relevant information such as: What you want to do, what you tried that didn't work (and specifically how it didn't work), and so forth. I wrote an article that should help you ask a better question:

    How to ask questions in a technical forum

    Bill