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

Отвечено abqbill's exec15/exec.exe stdout not re-directed when -c switch is used

  • Freitag, 4. Mai 2012 04: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.

Alle Antworten

  • Freitag, 4. Mai 2012 08: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?

  • Freitag, 4. Mai 2012 14:25
    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

  • Freitag, 4. Mai 2012 14:32
     
     

    Hi Oberwald/Pegasus,

    Bill, how did you find me out?!
  • Freitag, 4. Mai 2012 14:38
    Moderator
     
     
    Bill, how did you find me out?!

    It was a good guess <grin>

    Bill

  • Freitag, 4. Mai 2012 19:16
     
     

    is this normal behavior

  • Freitag, 4. Mai 2012 19:22
    Moderator
     
     

    Is what normal behavior?

    Bill

  • Freitag, 4. Mai 2012 19:29
    Moderator
     
     Beantwortet Enthält 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

  • Freitag, 4. Mai 2012 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.

  • Freitag, 4. Mai 2012 21:19
    Moderator
     
     

    Hi,

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

    Bill

  • Freitag, 4. Mai 2012 22:03
     
     
    Never mind. This is clearly beyond my level of expertise. I'll find another way.
  • Samstag, 5. Mai 2012 08: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.


    ¯\_(ツ)_/¯

  • Montag, 7. Mai 2012 14:10
    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