tee command cancels colors

May 20, 2008
11,529
102
Syracuse, NY, USA
The with/without TCSTART difference baffles me. What do you get from these?

Code:
v:\> timer (do i=1 to 10 (%comspec /c))
Timer 1 on: 13:11:43
Timer 1 off: 13:11:44  Elapsed: 0:00:00.558

v:\> timer (do i=1 to 10 (%comspec /i /c))
Timer 1 on: 13:11:51
Timer 1 off: 13:11:52  Elapsed: 0:00:00.403

I don't think being in TCMD should make any difference.
 
May 20, 2008
11,529
102
Syracuse, NY, USA
Code:
e:\utils>timer (do i=1 to 10 ("%comspec" /c))
Timer 1 on: 17:02:04
Timer 1 off: 17:02:07  Elapsed: 0:00:02.890

e:\utils>timer (do i=1 to 10 ("%comspec" /i /c))
Timer 1 on: 17:02:33
Timer 1 off: 17:02:36  Elapsed: 0:00:02.773

Joe
That seems to me like a long time for TCC to just start and stop, especially with "/i". I can't explain it. It does explain the times your in-process vs. out-of-process pipe tests.
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
You can workaround this difficulty by using in-process pipes. It also works around other things getting lost when a pipe instance of TCC momentarily removes the console's ENABLE_VIRTUAL_TERMINAL_PROCESSING mode (like tabstop settings and underlining). Much to my surprise, and contrary to the help, in-process pipes seem, almost always, to be faster than out-of-process pipes, sometimes a lot faster. Here are a couple timing comparisons. If others compare times, I'd like to hear the results.

It's not surprising that the in-process pipes are faster with trivial pipe processing, since they don't have the overhead of starting another process. In the real world of large pipe transfers, a child pipe process (running on a separate core) is going to be faster -- usually much faster.
 
Similar threads
Thread starter Title Forum Replies Date
C TEE command appending null characters to output Support 6
D Why is the TEE command 120 times slower? Support 10
David McClelland TEE command puts it's output file in c:\ Support 4
A How to? TEE - duplicate output to STDERR Support 3
Peter Murschall TEE cannot handle Unicode output Support 2
vefatica TEE /A adds newline? Support 2
vefatica Debug messages from TEE? Support 3
Joe Caverly Problem with TEE in v22 Support 2
Roedy problem with tee Support 2
krischik WAD Tee printing Chinese characters Support 7
J TEE Problem Support 11
vefatica WAD TEE adds newlines Support 4
A How to? Use TEE with .NET output Support 6
D WAD Multiple TEE causese weird variable scoping? Support 7
S Tee? Support 9
Z CMDDebug - TCC unknown command Support 2
F Edit command Support 1
rconn News Take Command / TCC / CMDebug / TCC-RT 28.02.17 Support 0
old coot LEAVE appears to affect command-line arguments Support 11
J VDESKTOP command Support 3
Dmitry L. Kobyakov How to? How to remove the record of the old version of the Take Command? Support 9
D Can alias pass parameters to for command? Support 3
samintz How to? Search for %(command) in Help? Support 1
T VIEW only works from command line Support 14
rconn News Take Command / TCC / CMDebug / TCC-RT v28 Released Support 0
T Take Command 28: Lua reports version 5.4.0 (5.4.3 expected) [SOLVED] Support 1
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.24 uploaded Support 0
J Take command does not start on Windows 10 Support 3
vefatica `Back quotes` - command line vs. batch file Support 5
Jay Sage WAD Failure of Alias Command with /Z Option Support 14
Phileosophos Is there any way to open the Take Command options dialog from the command line? Support 8
Phileosophos Command-line Editing Shortkeys That Fail Support 6
fpefpe How to? free (internal) command Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.23 uploaded Support 0
T How to? retain command history across reboot? Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT v27.01 Build 22 Uploaded Support 0
Jay Sage Bug With Flow Control and/or Command Grouping Support 2
GermanDirk How to? EVENTLOG Command with simple User Rights not functional Support 4
Jay Sage Take Command Is Too Fast! Support 4
Jay Sage Comparison of IF with Command Group and IFF Support 6
D Open Windows 10 Photos app from command line Support 11
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.21 uploaded Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.20 uploaded Support 0
U Can not get/start Take Command gui Support 1
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.19 Support 0
S Increasing Font Point Size in Command Tabs Support 2
mfarah Fixed The DATE command produces the wrong error message. Support 1
vefatica Command name mix-up Support 3
FreezerBurnt "Missing SETLOCAL" when initializing Visual Studio Command Prompt. Support 9

Similar threads