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

  • Friday, May 04, 2012 4:01 AM
     
     

    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.

All Replies

  • Friday, May 04, 2012 8:30 AM
     
     

    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?

  • Friday, May 04, 2012 2:25 PM
    Moderator
     
     

    Hi Oberwald/Pegasus,

    He's talking about exec15.zip.

    Hi Phil,

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

    Bill

  • Friday, May 04, 2012 2:32 PM
     
     

    Hi Oberwald/Pegasus,

    Bill, how did you find me out?!
  • Friday, May 04, 2012 2:38 PM
    Moderator
     
     
    Bill, how did you find me out?!

    It was a good guess <grin>

    Bill

  • Friday, May 04, 2012 7:16 PM
     
     

    is this normal behavior

  • Friday, May 04, 2012 7:22 PM
    Moderator
     
     

    Is what normal behavior?

    Bill

  • Friday, May 04, 2012 7:29 PM
    Moderator
     
     Answered Has Code

    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

  • Friday, May 04, 2012 9:16 PM
     
     

    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.

  • Friday, May 04, 2012 9:19 PM
    Moderator
     
     

    Hi,

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

    Bill

  • Friday, May 04, 2012 10:03 PM
     
     
    Never mind. This is clearly beyond my level of expertise. I'll find another way.
  • Saturday, May 05, 2012 8:19 AM
     
     
    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.


    ¯\_(ツ)_/¯

  • Monday, May 07, 2012 2:10 PM
    Moderator
     
     
    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