problem with tee

#1
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?
 

rps

Jul 6, 2008
378
4
#2
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