Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

problem with tee

Jun
127
2
if "%runwith" == "jar" java.exe %JAVA_OPTIONS -ea -jar replacewebsite.jar %configuration |& tee C:\temp\somestores.log

timer off >> C:\temp\somestores.log

the program executes, but when all is done somestores.log just has the timer off line, nothing from replacewebsite.jar. What am I doing wrong?
 
Not sure what you are doing exactly , but have you tried using command grouping?


Code:
C:\JPSoft\tcmd20x64>(echo. & echos Cmd and History `log` ===` ` %_hlogfile & echo.) |& tee /a TestLogfile.log

Cmd and History log ===  C:\JPSoft\TCMD20x64\logs\TC13_Jul_2016.log

C:\JPSoft\tcmd20x64>v TestLogfile.log

C:\JPSoft\tcmd20x64>(echo. & echos Cmd and History `log` ===` ` %_hlogfile & echo.) | tee /a TestLogfile.log

Cmd and History log ===  C:\JPSoft\TCMD20x64\logs\TC13_Jul_2016.log

C:\JPSoft\tcmd20x64>type testlogfile.log

Cmd and History log ===  C:\JPSoft\TCMD20x64\logs\TC13_Jul_2016.log

Cmd and History log ===  C:\JPSoft\TCMD20x64\logs\TC13_Jul_2016.log

Without command grouping.
Code:
C:\JPSoft\tcmd20x64>echo. >! TestLogfile.log

C:\JPSoft\tcmd20x64>type testlogfile.log


C:\JPSoft\tcmd20x64>echo. & echos Cmd and History `log` ===` ` %_hlogfile & echo. |& tee /a TestLogfile.log

Cmd and History log ===  C:\JPSoft\TCMD20x64\logs\TC13_Jul_2016.log

C:\JPSoft\tcmd20x64>type testlogfile.log

.. now with the command grouping added ....


Code:
C:\JPSoft\tcmd20x64>(echo. & echos Cmd and History `log` ===` ` %_hlogfile & echo.) |& tee /a TestLogfile.log

Cmd and History log ===  C:\JPSoft\TCMD20x64\logs\TC13_Jul_2016.log

C:\JPSoft\tcmd20x64>type testlogfile.log



Cmd and History log ===  C:\JPSoft\TCMD20x64\logs\TC13_Jul_2016.log
 

Similar threads

Back
Top