On 5/1/2013 11:03 AM, me at wrote:
> Thank you for the replies.
>
> I found the vbs script at
>
http://www.netikka.net/tsneti/info/tscmd094.htm It only will give
> me stdout.
>
> The tee.exe from softintegration gives it all, so I am using it.
> Although, it gives the stderr and stdout in opposite order from
> the linux one.
>
> Thanks,
>
> Vic
>
>
>
> - tee.vbs 8< ----------------------------------------------------
> Dim str
> Do While Not WScript.StdIn.AtEndOfStream
> str = WScript.StdIn.ReadLine
> WScript.StdOut.WriteLine str
> WScript.StdErr.WriteLine str
> Loop
> - >8 tee.vbs ----------------------------------------------------
>
> -----------------------------------------------------------------
> What I tried in my script, 3 different tries,
> dbdoctor -drc -shapes -no_backup vic.brd | cscript /nologo c:\bin\TEE.VBS 2> check_wn_stderr 1> check_wn_stdout
> dbdoctor -drc -shapes -no_backup vic.brd | c:\bin\TEE.VBS 2> check_wn_stderr 1> check_wn_stdout
> dbdoctor -drc -shapes -no_backup vic.brd | c:\bin\TEE.VBS > check_wn_screen
>
>
> I copied pasted the tee.vbs and inserted it into my bat file.
> Works good except I only get stdout in the file. Same behaviour
> with all three of the above lines. I also tried swapping, in the
> tee.vbs lines 4 and 5.
>
> -----------------------------------------------------------------
> What I get with the tee.vbs, only stdout, no stderr,
>
> 0 warnings, 0 errors detected, 0 errors fixed.
> Writing database to disk.
>
>
> -----------------------------------------------------------------
> This is my goal, it is what I get in the log file when I run it
> the old way, when I run it without any screen output, without
> tee.vbs. Like this
> dbdoctor -drc -shapes -no_backup vic.brd 2> check_wn_stderr 1> check_wn_stdout
Try this (tested using a DIR command with file not found output)...
dbdoctor args 2>&1 | cscript /nologo c:\bin\TEE.VBS > all_output
VBScript's .stderr will be sent to screen while .stdout will be
redirected to file named all_output.
In otherwords, do not misuse 2>file because all output from dbdoctor
will be included in both the file as well as on screen.